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

Maryanne Gray
PLUS
Maryanne Gray
Courses Plus Student 290 Points

adding an image element

what is wrong with this:

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


      </ul>
    </section>
Dustin Morris
Dustin Morris
8,715 Points

Maryanne,

At first I did not see your full problem and I wrote a response telling you that I needed more detail.For some reason, it didnt show up in my browser. Now I see it. I can help you. THe probelm is with your quotes. If you plan to leave alt empty, erase it altogether like so :

<li><img src="img/number-02.jpg"></li>

If you want to leave it you need to add another quote to close the src element, like so:

<li><img src="img/number-01.jpg alt"alt infor here" "></li>

That is the problem with your code above. Hope that helps.

2 Answers

I think the problems are the way you write your images

<img src="img/number-01.jpg alt"">

is not correct, the way the quotation marks are placed. Also there needs to be an equal sign after alt. For example

<img src="img/number-01.jpg" alt="Image 1">

or

<img src="img/number-01.jpg">
Dustin Morris
Dustin Morris
8,715 Points

you are absolutely right.

Dustin Morris
Dustin Morris
8,715 Points

you are absolutely right.

Looks like you may have an extra quotation mark in your img tags.