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

Bianca Bryan
Bianca Bryan
288 Points

I'm stuck on a task. The step is to add images to the code, no caption or links just the image.

I'm not sure where I went wrong exactly. Everyone starts somewhere. Can someone point me in the right direction please?

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.jpg">
          </a>
      </li>
      <li>
      <a href="img/numbers-02.jpg">
          </a>
      </li>
      <li>
      <a href="img/numbers-06.jpg">
          </a>
      </li>
      </ul>
    </section>
    <footer>
      <p>&copy; 2013 Nick Pettit.</p>
    </footer>
  </body>
</html>

2 Answers

Konrad Pilch
Konrad Pilch
2,435 Points

Hi, look where you put it :) Its inside href. Inside href its a link. Take it out :)

You made a link to the image itself but didn't include it as img into the document!

remove the a tag and create an image tag:

<img src="/Path/to/image" alt="optional image description">

And to make it complete, some like to mark it as self-closing tag and write it like this:

<img src="/Path/to/image" alt="optional image description" />

But both is valid html5!

Konrad Pilch
Konrad Pilch
2,435 Points

You gave too much of a hint!

Lets try not to give away the answer straight away but let other people solve the challenge them selfs. As this will imrpvoe thier solving problem skill etc.. And they will learn better that way.

well perhaps but this tend to be normal here. Since always someone posts the answer I sometimes do it myself don't know why but I think like you that a little helpful hint is more helpful than the solution.

Konrad Pilch
Konrad Pilch
2,435 Points

This is form my own experience.

When i used to post every self challenge from my code on treehouse, everyone used to give me full answers, so i just took them . But i didnt solve anything, we should learn from mistakes.

Well, i stopped using treehouse for ok 3 months, and after that, i was thinking etc.. and i got much better at it. Sometimes its good to stop something , or live for a while :)

But , at least half hint, would be better than the full answer. Well , sometiems the full answer yes, but it depends on the question and its complexity i belive.

Yeah, I think so too! If I ask I always say I don't want the full answer :P

Konrad Pilch
Konrad Pilch
2,435 Points

Though then the person helping out should think on how to give it as a hint xD

Bianca Bryan
Bianca Bryan
288 Points

Thanks, that made way more sense.