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

Reginald Laratte
Reginald Laratte
3,297 Points

<a href="img/numbers-01.jpj>"> </a><li>

<a href="img/numbers-01.jpj>"> </a><li>

index.html
<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8">
    <title>Nick Pettit</title>
  </head>
  <body>
    <header>
      <a href="index.html">
        <h1>Nick Pettit</h1>
        <h2>Designer</h2>
      </a>
      <nav>
        <ul>
          <li><a href="index.html">Portfolio</a></li>
          <li><a href="about.html">About</a></li>
          <li><a href="contact.html">Contact</a></li>
        </ul>
      </nav>
    </header>
    <section>
      <ul>
      <li>
        <a href="img/numbers-01.jpj>">
        </a><li>
          <a href="img/numbers-02.jpj>">
        </a><li>
       <a href="img/numbers-06.jpj>">
        </a><li>
       </ul>

    </section>
    <footer>
      <p>&copy; 2013 Nick Pettit.</p>
    </footer>
  </body>
</html>
Tyler _
Tyler _
6,651 Points

TYPO:

should be:

<a href="img/numbers-01.jpg"> </a><li></html>

5 Answers

Jarrett Young
Jarrett Young
12,635 Points

Hi,

What you need to do is actually simpler than that.

You don't even need to include a href links. Only the img src. Like so: ''' <section> <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> </section> ''' Hope that helps!

Tyler _
Tyler _
6,651 Points
<a href="img/numbers-01.jpg"> </a><li></html>
Reginald Laratte
Reginald Laratte
3,297 Points

I tried that way and it still didn't work

Reginald Laratte
Reginald Laratte
3,297 Points

Thank you. Also I should not attempt to do education late at night because I make a lot errors.

Kirby Abogaa
Kirby Abogaa
3,058 Points

First: You have typos on your unordered list inside the section element because the list is not closed properly and images are not contained within the list.

Second: Lets see the difference between the two lines of code.

<body>  
  <ul>
    <li><img src="img/numbers-06.jpg" alt="" /></li>
  </ul>
</body
</html>```

The image element "img" with a source "src" attribute displays an image on your webpage.

 ```<html>
<body>  
  <ul>
    <li><a href="img/numbers-06.jpg" alt="">Click Here.</a></li>
  </ul>
</body>
</html>```

*The above will "DISPLAY A LINK TO THE IMAGE".
*The anchor "<a></a>" element with an "href" attribute is used to create a link for a separate file to be displayed only when the link is accessed or clicked. 

This can also be used to access different parts/elements of a webpage by referencing its ID. ie.
```<a href="#idselector">Back to top.</a>``` will link you to a part of the webpage with the specified ID. The anchor element also expects some information between its tags which will be displayed as a link.



Hope this helps.