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

HTML

Stuck in HTML track code challenge

Here is the bit of code regarding to the specific step in the challenge:

<section> <ul> <li>img src= "img/numbers-01.jpg"</li> <li>img src= "img/numbers-02.jpg"</li> <li>img src= "img/numbers-06.jpg"</li> </ul> </section>

When I go to check my work, I get an error in red saying:

"Bummer! Make sure you include an image tag that displays 'img/numbers-01.jpg'."

2 Answers

Paul Sullivan
Paul Sullivan
7,876 Points

In order to include an image into your code, you'll want to make sure you are opening and closing the img tag properly. It should look something like this:

<img src="img/numbers-01.jpg">

Note the angle brackets before and after the code. The "<" bracket begins the line of code before "img" and the ">" after "numbers-01.jpg" is closing it. For multiple images, simply copy/paste that entire line of code, but change the 1 to a 2 or 6. So you'd have this:

<img src="img/numbers-01.jpg">
<img src="img/numbers-02.jpg">
<img src="img/numbers-06.jpg">

Also note that when adding images to code, you'll want to also use the "alt" attribute to give it descriptive text for readers and search engines. That would look like:

<img src="img/numbers-01.jpg" alt="This is image number 1">
<img src="img/numbers-02.jpg" alt="This is image number 2">
<img src="img/numbers-06.jpg" alt="This is image number 6">

Hope this helps!

Hmm thats odd for some reason I had the brackets but then when I pasted it, they didn't show up. Thank you, any ways!