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 trialKaris Thiel
192 PointsI type the code exact but don't know what I'm doing wrong for task 2 how to make a website (adding images to gallery)
What am I doing wrong for this challenge? I have typed the code exactly as I did in my workspace while I was following along with the video but I keep getting the same error message that I need to "add an image tag for numbers-01.jpg". Could someone please help?
When I preview the page it looks like the links are broken. I'm not sure why. I uploaded them to my workspace along with the video tutorial.
Thanks!
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Nick Pettit</title>
</head>
<body>
<header>
<a href="index.html">
<h1>Nick Pettit</h1>
<h2>Designer</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>
<img src="img/numbers-01.jpg" alt="">
</li>
<li>
<img src="img/numbers-02.jpg" alt="">
</li>
<li>
<img src="img/numbers-06.jpg" alt="">
</li>
</ul>
</section>
<footer>
<p>© 2013 Nick Pettit.</p>
</footer>
</body>
</html>
3 Answers
tootiemcflow
5,601 PointsYou don't need to specify the img/
directory for the images in this challenge.
So, remove the img/
directory from all the image element's src
attributes and the challenge should pass.
<img src="numbers-01.jpg" alt="">
Karis Thiel
192 PointsOk thank you! I really appreciate your help! :)
Jennifer Kauffman
1,533 PointsI had the exact same problem. Now it is saying that Task 1 is no longer passing?
tootiemcflow
5,601 PointsCan you share your code?
Jennifer Kauffman
1,533 Points<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>Nick Pettit</title> </head> <body> <header> <a href="index.html"> <h1>Nick Pettit</h1> <h2>Designer</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> <nav> <ul> <li> <img src="numbers-01.jpg" alt=""> </li> <li> <img src="numbers-02.jpg" alt=""> </li> <li> <img src="numbers-06.jpg" alt=""> </li> </ul> </nav> </section> <footer> <p>Ā© 2013 Nick Pettit.</p> </footer> </body> </html>
tootiemcflow
5,601 PointsInside the section
tags you have a ul
element nested inside a pair of nav
tags. Try removing the nav
tags.
Jennifer Kauffman
1,533 PointsThank-you so much!!! It worked. But I aslo feel really stupid now! :(
tootiemcflow
5,601 PointsDon't feel that way! The more HTML and CSS you write the more you'll notice these little errors.
Courtney King
1,803 PointsCourtney King
1,803 PointsI'm doing this same code challenge and even after removing the img/ the challenge still wont pass. My code looks exactly like hers.