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 Organize with Unordered Lists

Help with Images?

Can someone tell me what's wrong with the code below? It would really help if there were clues instead of the program just saying things are wrong. It's a big, discouraging waste of time!!!

<section>
  <ul>
    <li><a href=img/numbers-01.jpg></li>
    <li><a href=ing/numbers-02.jpg></li>
    <li><a href=img/numbers-06.jpg></li>
    </a>
  </ul>
</section>

4 Answers

You need to put '''<img src"imagepath"> rather than <a href=""> A href is for hyper links, hyper link reference. Img src is image source.

Nick Nish
Nick Nish
7,304 Points

Hi @Jen, to clear up what @Richard is saying, if you want to insert an img then you'll want to use the image tag:

<li><img src="img/yourimage.jpg" /></li>

If you want, you can also make this image link to something by surrounding it with <a> tags:

<li>
   <a href="#">
   <img src="img/yourimage.jpg" />
   </a>
</li>

Edit: Forgot to close the <a> tags

Thanks Nick Nish I am really tired and am trying to help as i go along, this community is great!

Thank you both very much! I knew I was doing something wrong, but couldn't remember what.

The community here is great, didn't expect to get answers so soon! I'm learning more here than the class I paid $3500 for. Wish I knew about Treehouse before I signed up for the class.

Nick Nish
Nick Nish
7,304 Points

Happy to help! Feel free to keep posting in this Forum post or in the general Forums if you need help on anything else.

:), glad you enjoy it!