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 trialAndy Cooper
231 PointsWhat am I doing wrong here?
The error prompt just says "Make sure you include an image tag that displays "img/numbers-01.jpg".
I have the following between section tags:
<ul> <li> <a href="img/numbers-01.jpg"> <img src="img/numbers-01.jpg" alt=""> <p>1</p> </li>
<li> <a href="img/numbers-02.jpg"> <img src="img/numbers-02.jpg" alt=""> <p>2</p> </li>
<li> <a href="img/numbers-06.jpg"> <img src="img/numbers-06.jpg" alt=""> <p>6</p> </li> </ul>
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>
<a href="img/numbers-01.jpg">
<img src="img/numbers-01.jpg" alt="">
<p>1</p>
</li>
<li>
<a href="img/numbers-02.jpg">
<img src="img/numbers-02.jpg" alt="">
<p>2</p>
</li>
<li>
<a href="img/numbers-06.jpg">
<img src="img/numbers-06.jpg" alt="">
<p>6</p>
</li>
</ul>
</section>
<footer>
<p>© 2013 Nick Pettit.</p>
</footer>
</body>
</html>
3 Answers
Rich Bagley
25,869 PointsHi,
You look to be adding more than the challenge needs. You don't need the anchor tags wrapped around the image tags you add. The final code should look something like this:
<!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>
Hope that helps :)
-Rich
Andy Cooper
231 PointsThanks.
Rich Bagley
25,869 PointsNo problem :)
-Rich
Zachary Pratt
2,395 Points<img alt="" src=img/numbers-01.jpg"></img>
Jarrett Young
12,635 PointsHi,
You're actually doing more than what the challenge is asking. Try this --> ... <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>
Ricky Walker
12,863 PointsRicky Walker
12,863 PointsCurrently, the only issue I'm aware of is that your <a> or anchor tag isn't wrapping the images to make them clickable as links. Try wrapping your images in the <a> tags and see if that resolves the issue.