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

HTML How to Make a Website Creating HTML Content Use the Navigation Element

Why 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?

I'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

<a href="#top">Home</a>
<a href="#bottom">Contact</a>

<div id="top">
About Me Section at Top of page

<footer id="bottom">

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.

2 Answers

Bryce Santos
Bryce Santos
11,157 Points

Do you mean why "Portfolio" links to the homepage (itself)?

Sorry for not being totally clear. Yes that is what I am asking.

Michail Kislow
Michail Kislow
Front End Web Development Techdegree Student 3,462 Points

I 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.