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 trialRuby Wallace
160 PointsNeed help making anchor tag.
question was anchor tag go back to the top of the page. <a> herf="top" go back to the top of the page<a/>
2 Answers
Gabriel Plackey
11,064 PointsFirstly, it's href, not herf. Probably just a typo. Then the href needs to be in the anchor tag
<a href="top"> go back to the top of the page<a/>
Lastly, to take make it go to the top of the page we will change the href to #. Like
<a href="#"> go back to the top of the page<a/>
Oh and your closing tag is incorrect. The slash will come right after the start of the closing tag.
<a href="#"> go back to the top of the page</a>
Ruby Wallace
160 Pointsyes I saw where I misspelled href...let me try your suggestions will let you know if work. Thanks!
Ruby Wallace
160 PointsIt's : <a href="#top"> go back to the top of the page</a>
Gabriel Plackey
11,064 PointsYou must have top set as an id for something at the top of the page then.
Ruby Wallace
160 PointsRuby Wallace
160 Pointsneed help How do I add a class called "main-pg" to the paragraph element.