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 trialRyan Schwendel
Courses Plus Student 301 PointsIs This a Proper Image Tag?
I am currently working on stage 3 of the HTML coding series. and It is telling em this isn't a proper image tag. Could someone please tell me id i'm doing this correctly.
<!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>Blank 1</li>
<img src="img/numbers-01.jpg" alt="" width="720" height="1080">
<li>Blank 2</li>
<img src="img/numbers-02.jpg" alt="" width="720" height="1080">
<li>Blank 3</li>
<img src="img/numbers-06.jpg" alt="" width="720" height="1080">
</ul>
</section>
<footer>
<p>© 2013 Nick Pettit.</p>
</footer>
</body>
</html>
3 Answers
Shawn Denham
Python Development Techdegree Student 17,801 PointsIt's failing because you have inserted your images outside of your
tags. :)
You need to place your img tags where you have "Blank 1", "Blank 2" and "Blank 3"
gabecasalett
2,809 PointsRyan,
I wonder if it's because you didn't include the closing slash at the end of the img tag; try this:
<img src="img/numbers-01.jpg" alt="" width="720" height="1080" />
Lauren Stuckey
12,428 PointsHi Ryan, since image tags are self closing tags, you need the slash inside the tag itself, like this:
<img src="img/numbers-01.jpg" alt="" width="720" height="1080" />
Try adding that slash just before the closing carrot bracket on each of your images and see if that works for you. Best of luck!