Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

HTML

Alberto Vielledent
seal-mask
.a{fill-rule:evenodd;}techdegree
Alberto Vielledent
Front End Web Development Techdegree Student 1,583 Points

Using href="#" instead of index.html in the index tab?

I used the # to reference the Home link in the index.html and the About link in the about.html file. Is there anything wrong with that? In the example href="index.html" is used.

1 Answer

Keith Walker
Keith Walker
14,216 Points

Alberto, using hash marks to point to the home url wont yield the results you desire in the long run... hash marks are used as anchor tags example... site.com/#place that would take you to a specific place on a page when clicked. If you don't want to use "index.html" for a link to your home page i would suggest using the "/", this is universal and will take you back to the home page (index.html) from any page on a site.

Alberto Vielledent
seal-mask
.a{fill-rule:evenodd;}techdegree
Alberto Vielledent
Front End Web Development Techdegree Student 1,583 Points

Hi Keith thank you for your reply! I was using index.html in every other page to get back to the main page, but it seemed redundant to use index.html when you are already in the main page. (Same with using about.html on the about link to get to the about page when you are already in it.) To my understanding /# just takes you to the top of the page and that was the reason I was using it. I guess I'm failing to see or don't have enough experience to understand what issues that could cause in the long run.