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

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

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:

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

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!