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 Adding Pages to a Website Add a New Page

Kyle Schaper
Kyle Schaper
3,427 Points

Can someone tell me whats wrong with this bit of code, its giving me a 404 error when i try go back to portfolio.

Okay whenever i try go back to portfolio i get a 404 error, this is my about file...

<nav> <ul> <li><a href="index.hmtl">Porfolio</a></li> <li><a href="about.html" class="selected">About</a></li> <li><a href="contact.hmtl">Contact</a></li> </ul> </nav>

1 Answer

Hi Kyle,

For your index and contact links you put ".hmtl" for the extension and it should be ".html"

Kyle Schaper
Kyle Schaper
3,427 Points

Thank you very much! Also i dont know if its supposed to happen, but i can click from portfolio to about then from about to contact, but i cant seem to click straight from portfolio to contact, it gives me a 404 error.

This probably means that on your about page you have the contact link correct but on your portfolio page the contact link is not correct. Double check that.

I would check all 3 nav links in all 3 of your html files to make sure everything matches up. The only thing that should be different is where the "selected" class is.

Kyle Schaper
Kyle Schaper
3,427 Points

Oh thank you lol, im an idiot, should have made sure of that first! Thank you, its all working now!