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

Devin Scheu
Devin Scheu
66,191 Points

Okay so i'm having a hard tome with organizing un-ordered lists objective, part 2.

Here's my code, can anybody help out?

<section> <ul> <li> <a img src="img/numbers-01.jpg" alt=""> </a> </li> <li><a img src="img/numbers-02.jpg" alt=""> </a> </li> <li> <a img src="img/numbers-06.jpg" alt=""> </a> </li> </ul> </section>

Keith Kelly
Keith Kelly
21,326 Points

Unfortunately the code didn't post. Can you try it again?

7 Answers

Keith Kelly
Keith Kelly
21,326 Points

The issue seems to be that you combined the anchor and img tags. I don't know the objective the course off the top of my head, but if you only need to display the image it should look more like this:

<ul>
  <li>
    <img src="img/numbers-01.jpg" alt="">
  </li>
  <li>
    <img src="img/numbers-02.jpg" alt="">
   </li>
   <li>
     <img src="img/numbers-06.jpg" alt="">
   </li>
</ul>

If you need to link the image then you will want to wrap it in an anchor tag like this:

<li>
  <a href="#">
    <img src="img/numbers-01.jpg" alt="">
  </a>
</li>
Michael Hicks
Michael Hicks
24,208 Points

Make sure to place 3 backticks before and after your code. The instructions are located on the Markdown Cheatsheet link on this page.

Michael Hicks
Michael Hicks
24,208 Points

Okay, so first make sure you indent and organize your code properly, but the issue is that you've included an anchor tag in your image tag. Remove the a from your image tags and you should be fine.

Devin Scheu
Devin Scheu
66,191 Points
      <ul>
        <li>
          <a img src="img/numbers-01.jpg" alt="">
          </a>
          </li>
        <li><a img src="img/numbers-02.jpg" alt="">
          </a>
        </li>
        <li>
          <a img src="img/numbers-06.jpg" alt="">
          </a>
        </li>
 </ul>
    </section>```
Devin Scheu
Devin Scheu
66,191 Points

Thank you Michael and Keith, i'll try out your fixes.

Devin Scheu
Devin Scheu
66,191 Points

Yes, your guys fixes worked. Thank you very much!