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 trialJon Hux
846 PointsHi, I've added the anchor element for my photos, when clicking the photo I'm getting an error page, why?
Getting a 404 Error page when clicking on an image and all code seems to be aligned with the tutorial code.
3 Answers
1v4n
4,584 PointsThis should go to the image at:
img/number-01.jpg,
is the image in your img folder?
However I also noticed you have:
<li><a href="About.html" >About</a></li>
<li><a href="Contact.html">Contact</a></li>
Which should be lowercase (to be consistent):
<li><a href="about.html" >About</a></li>
<li><a href="contact.html">Contact</a></li>
Samuel Glister
12,471 PointsHi Jon,
Can you please post your code and we can have a look at it for you :-)
Thanks Sam
Jon Hux
846 PointsHi Samuel,
I know there are multiple images to have but I've minimized it down to one till I find the fix.
<!DOCTYPE html>
<html>
<head>
<meta charset = "utf-8">
<title>Jonathan | Programmer</title>
</head>
<body>
<header>
<a href="index.html">
<h1>Jonathan Hucks</h1>
<h2> Programmer</h2>
</a>
<nav>
<ul>
<li><a href="index.html">Portfolio</a></li>
<li><a href="About.html" >About</a></li>
<li><a href="Contact.html">Contact</a></li>
</ul>
</nav>
</header>
<section>
<ul>
<li>
<a href="img/number-01.jpg">
<img src="img/numbers-01.jpg" alt="">
<p>Experimentation with color and texture.</p>
</a>
</li>
</ul>
</section>
<footer>
<p>Ā© 2014 Jonathan Hucks.</p>
</footer>
</body> </html>
Jon Hux
846 PointsI don't see any dependencies in code, so maybe the issue is on treehouse's side that the additional webpage is not opening up with the photo
Jon Hux
846 PointsThank you Samuel, there was just typo in image name.
Jon Hux
846 PointsJon Hux
846 PointsYou got it right 1v4n, it was a misnaming in the anchor tag vs my my image file name where I had:
<a href="img/number-01.jpg"> <a href="img/numbers-01.jpg">
--should have been this.