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 trialMicah Walton
4,674 PointsWhy link to the homepage from the homepage?
So the anchor tags for the portfolio and other stuff are listed in the index.html page with the link to themselves which means they go nowhere. All it would do is refresh the page right? Am I missing something?
2 Answers
Bryce Santos
11,157 PointsDo you mean why "Portfolio" links to the homepage (itself)?
Micah Walton
4,674 PointsSorry for not being totally clear. Yes that is what I am asking.
Michail Kislow
Front End Web Development Techdegree Student 3,462 PointsI guess because the portfolio on this example page is on the main page ("index.html") where it says "Gallery will go here." Since the navigation will appear on other pages it makes sense in this case because you always want the user to find the portfolio.
Usually you would place the portfolio on a separate page (e.g. "portfolio.html") and maybe showcase only the latest works on your main page.
Raul Rodriguez
9,520 PointsRaul Rodriguez
9,520 PointsI'm not sure i understand your question 100% but one reason for linking back to the home back could be to link back to the top of the page via an id
In this case the home anchor would take you to the about me section at the top of the page and the Contact would take you to the footer at the bottom of the page. Otherwise, you could set a link to index.html in preparation of adding additional pages.