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

Molly Parker
Molly Parker
1,526 Points

img src doesn't seem to be working.

Hello! I'm trying to insert the image: numbers-01.jpg but when I save and refresh it doesn't seem to be yielding any results.. I can't see anything wrong with the code, what I have is:

 <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>

I've made sure to title the folder for my images img and they have been uploaded and put into the img folder. See screenshots below:

alt text

alt text

Can anyone see what I'm doing wrong? Thanks for your help!

4 Answers

Your code seems to be correct. try go to "preview" and click "refresh", maybe this will help.

Hi, try to replace the "-" before href on "="

<section>
      <ul>
        <li>
          <a href-"img/numbers-01.jpg"> //it should be <a href="img/numbers-01.jpg">
            <img src="img/numbers-01.jpg" alt"">
            <p>Experimentation with color and texture.</p>
          </a>
        </li>
      </ul>
    </section>
Molly Parker
Molly Parker
1,526 Points

Thanks for your response! I've updated the code to:

<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>

but I'm still not seeing the image when I save and refresh.

Sreng Hong
Sreng Hong
15,083 Points

I don't see any error of your code. You did it right. I think there maybe is other part error, so can you post the whole of your index.html?

Molly Parker
Molly Parker
1,526 Points

Ah, that fixed it! Hitting refresh brought the image up. Thanks for your help!