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
Akhter Rasool
8,597 Pointsid selectors can also be used as fragments
id selectors can also be used as fragments, what does this mean?
what do fragments mean?? what does it do?
1 Answer
sarahwehinger
3,848 PointsFor example you can give your header element the id="top". Then you go down to the footer and write an anker element and in the href Attriubte you write not a link but the id (#top). If you now click on this link you will brought to the top of the page and your link will look like www.example.com#top. This #top in the URL is the fragment.
<a href="#top" alt="">Back to top</a>