Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

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!