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 trialInnocent Chipwere
1,831 PointsSet the anchor tag so that it points to the top of the page. (Hint: you'll need the href attribute.)
<a href="#">
<!doctype>
<html>
<head>
<title>My trip to Spain</title>
</head>
<body>
<img src="images/spain.jpg"alt="A picture of me in Spain">
<P> Here is a picture of me in Spain last summer!</p>
<li>a> href="http://www.top.com">Go back to the top of the page.
</body>
</html>
2 Answers
Steven Parker
231,236 PointsIt seems you've put the correct solution on the line just before where your code block starts. The one showing this:
<a href="#">
A few other hints:
- use lower case for tag names
- don't change anything in the challenge not asked for (like adding an "li" tag)
- relative links (such as into the same document) won't have "http://" in them
Amanda Alonzi
2,620 Points<a herf="#top"></a> this is what i have entered but its wrong so i am having a hired time figuring out why.
Steven Parker
231,236 PointsThe attribute name should be "href" ("r" before "e") instead of "herf".
Wally Bryan
4,350 PointsWally Bryan
4,350 PointsI think the issue is that you have not closed your <a href> (look just after the <li>) -
So the link is broken -
It should read
<li> <a href="XXXX"> To Top </a> </li>
Also if you are trying to link one link to another on the same page you would need to create two links on that page with both the same link location.
This could be
<a href="to-top"> (a link at the top of the page)
< a href="to-top"> (at the bottom of the page)
This will then have the page jump from the bottom to the top