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 triallinzhang5
2,398 Points<a href="">
Hey I am a little confused about the use of anchor element here. Could anyone explain it further for me? When and how to use this element and what does href for? Such as this line< a href ="index.html"> </a> Thank you so much for your help!!!
2 Answers
Jonathan Grieve
Treehouse Moderator 91,253 PointsHi there.
The anchor tag <a></a>
should go inside the list item elements of an unordered list. It's the element for creating hyperlinks so you can link pages together.
So it's an anchor element that does inside list item element (i.e. a child of a list item element) which is a child of an unordered list element.
Hope this helps :)
Mike Schaming
13,925 PointsHi!
In addition to the info Jonathan provided, the href stands for Hypertext Reference-
In your code, the anchor will take users back to the index.html page. This is handy if they are navigating around other pages And want to return home.
Take care-