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

CSS How to Make a Website Adding Pages to a Website Add a New Page

Diego Murray
Diego Murray
2,515 Points

When on my About page, when I try to click on my Portfolio page it says Error 404.

When opening my portfolio/ home page everything works fine. When I continue on to the About page all is good still. But Error 404 appears when I from the About page to the Portfolio page.

5 Answers

Alexander Smith
Alexander Smith
2,769 Points
<li><a href="home.html">Home</a></li>

should be

<li><a href="index.html">Home</a></li>
Alexander Smith
Alexander Smith
2,769 Points

We'll need a filetree and the html for your navigation to be able answer this question specifically.

You probably have the href wrong in your anchor tag.

Diego Murray
Diego Murray
2,515 Points

How can I add my Workspace Content to this discussion?

Alexander Smith
Alexander Smith
2,769 Points

For the html just use the markdown cheatsheet it will explain it. For the file tree you'll just kind of have type it. If they're all on the same level though just listing the file names would be enough.

Check what your href link in your About page, make sure it says

href="index.html"
Diego Murray
Diego Murray
2,515 Points

'''html <nav> <ul> <li><a href="home.html">Home</a></li> <li><a href="about.html" class="selected">About</a></li> <li><a href="contact.html">Contact</a></li> </ul> </nav>'''

I'm not sure if this snapshot link works. https://w.trhou.se/omdj0vue0u

You have the link to href="home.html"

It needs to be href="index.html"

No problem :)