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 trialchristopher young
178 Pointshow do i write and image tag
well i am stuck on a code challenge that is asking e to write an image tag in an un-ordered list i got the list right but i can't figure out how to write the image tag can you guys help me
<!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/numbers-O1.jpg"</li>
<li>"img/numbers-O2.jpg"</li>
<li>"img/numbers-O6.jpg"</li>
</ul>
</section>
<footer>
<p>© 2013 Nick Pettit.</p>
</footer>
</body>
</html>
3 Answers
Chyno Deluxe
16,936 PointsThis is what the challenge is asking for you to do.
<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>
Schweine FEin
2,671 Pointsnot right but good start. The image tag works like this:
<img src="path to img" alt="optional image description">
And to make it complete. Some want to make clear that the img tag is a self closing tag and write it like this:
<img src="path to img" alt="optional image description" />
But this is more a matter of taste since both is valid html5
edit: Sorry some problems with code tags... Now it should be right
christopher young
178 Pointsthanks
Chyno Deluxe
16,936 Points<img src="img/numbers-O1.jpg" alt="" />
christopher young
178 Pointsthanks guys i will give it a try
christopher young
178 Pointshey um... so it still says i am wrong what else am i doing wrong?