Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

CSS CSS Basics (2014) Basic Selectors ID Selectors

Victor Gordian
Victor Gordian
4,656 Points

Just reassurances

<a href="#top">Back to top ยป</a> this is to link, like it will be underline, and it will be clickable..correct? Can someone explain to me how this works..i id my header top so therefore when i click the bottom "back to top" it goes where i put the id which is the header which happens to be in the top, right? it can work with links as well?

1 Answer

Joe Rizza
Joe Rizza
8,513 Points

I'm assuming you are asking about anchor tags. Anchor tags can be applied to quickly jump to a section on a page:

<div id="top">Hello World</div>
<p>Page Content</p>
<a href="#top">To the top!</a>
Victor Gordian
Victor Gordian
4,656 Points

ohh i see, it wouldnt work with links?

Joe Rizza
Joe Rizza
8,513 Points

It can also work with links as the anchor:

<a href="#raptors">Learn about raptors</a>
<a id="raptors" href=""> Stuff about Raptors </a>