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 trial
stebbinsnatalie
325 PointsSrc or href?
Bummer! Make sure you include an image tag that displays "img/numbers-01.jpg".
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>Natalie Stebbins | My Drawings</title> </head> <body> <header> <a href="index.html"></a> <h1>Natalie Stebbins</h1> <h2>My Drawings</h2> </a> <nav> <ul> <li><a href="index.html">Portfolio</a></li> <li><a href="about.html"></a>About</a></li> <li><a href="contact.html">Contact</a></li> </ul> </nav> </header> <section> <ul> <li> <a href="img/numbers-01.jpg"> </a> </li> <li> <a href="img/numbers-02.jpg"> </a> </li> <li> <a href="img/numbers-06.jpg"> </a> </li> </ul> </section> <footer> <p>Ā© 2014 Natalie Stebbins.</p> </footer> </body> </html>
BTW it only said to do the first 3 images
stebbinsnatalie
325 Points<!DOCTYPE html> is in the work it just isn't in there for some reason
stebbinsnatalie
325 Points<!DOCTYPE html> is in the work it just isn't in there for some reason
stebbinsnatalie
325 Points<!DOCTYPE html> is in the work it just isn't in there for some reason
2 Answers
Chyno Deluxe
16,936 Pointsan img tag would use the "src" attribute. and an img tag.
<a href="img/numbers-01.jpg"><img src="img/numbers-01.jpg" alt="numbers 1"/><a/>
in the example above. the anchor tag is linking to the image itself using the href=" " but the <img src="/image.jpg"> is what will display your image.
nik
8,925 PointsMartin is correct, you are actually using two tags. One to display the image <img> wrapped in another tag that links to the actual picture <a href>.
<a href="img/numbers-01.jpg">
<img src="img/numbers-01.jpg">
</a>
The img tag uses src to indicate the location of the image to display and the hyperlink uses href to indicate the location the link should go to.
stebbinsnatalie
325 Pointsstebbinsnatalie
325 Points<!DOCTYPE html> is in the work it just isn't in there for some reason