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 How to Make a Website Creating HTML Content Add Image Gallery Content

keren lerner
keren lerner
3,561 Points

Getting error message for img src.

It's highlighting this section

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

in red and won't render the image on the page.

Here's the code for the section. Thanks!

<section> <ul> <li> <a href="img/numbers-01.jpg" <img src="img/numbers-01.jpg" alt=""> <p>Experimentation with color and texture.</p> </a>

    </li>



  </ul>
</section>

3 Answers

Erik McClintock
Erik McClintock
45,783 Points

Keren,

If the code above was copy/pasted, you're missing a closing bracket on your anchor tag. You have:

<a href="img/numbers-01.jpg"
<img ....>
<more code here>

In your opening anchor tag, it is missing its closing bracket. You need:

<a href="img/numbers-01.jpg">
<img ....>
<more code here>

Hope this helps!

Erik

keren lerner
keren lerner
3,561 Points

That copy paste didn't work properly. Specifically, the line of code within the code I pasted that is being highlighted in red is the img src line. Thanks!

keren lerner
keren lerner
3,561 Points

Thanks Erik! That worked :)

Erik McClintock
Erik McClintock
45,783 Points

Great! Glad to have been of assistance :)