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

fragment identifier, landmark

In this video, Guil says that ID selectors can create anchors or landmarks. What is a landmark? Also, he says that the use of ID selectors to create anchors and landmarks makes them "fragment identifiers." I don't understand the term "fragment identifiers." Can someone explain? Thanks.

1 Answer

Let's suppose an HTML document has a div with an ID of "middle." If "#middle" is added to the end of the URL (without quotes), the browser will advance automatically to that section of the document. Navigate to this URL: http://en.wikipedia.org/wiki/Fragment_identifier ...and now add "#footer" to the end of this URL and refresh the page. If you inspect the HTML of the Wikipedia page, you'll see that there is actually an ID of "footer." This is a fragment identifier in action. Hope that helps!

Thank you that does help.