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

Sean Powell
Sean Powell
355 Points

I can't get through this code challenge

I can not get through the code challenge it keeps saying there is no image tag for img/numbers-01.jpg but I have definitely put it in and then when I try and ask a question from that page it wont let me so I loose all my work and you can't see what I have done to say what I have done wrong. Frustrated I can't get past this!!

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>
    </section>
    <footer>
      <p>&copy; 2013 Nick Pettit.</p>
    </footer>
  </body>
</html>

Hi Sean,

So we can see what causing the error, when you reach that point in your code challenge:

  • Click in the challenge window
  • Ctrl + A (Cmd + A on a Mac) to select all the code.
  • Followed by Ctrl + C (Cmd + C on a Mac).
  • Open this post in a new tab (Ctrl + T or Cmd + T in the browser) so you don't lose the stage you're at in the challenge.
  • Paste your copied code in to the post with 3 backticks (```) on the line before and after the code. This will format it so we can view it easier.

We should then be able to identify the issue :)

-Rich

Sean Powell
Sean Powell
355 Points

I have sent an e-mail to support with a screen shot of where I was up to when I encountered the problem. It is asking me for an image tag which I definitely have in my code but for some reason it is saying it is still wrong. When I tried to start a discussion from on the page, I lost my work and it defaults back to the view you see above you which obviously contains no image coding yet.

4 Answers

Damien Watson
Damien Watson
27,419 Points

Hi Sean, If you are inserting the 'src' correctly, then it may be the alt="" that you are missing:

    <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>
Sean Powell
Sean Powell
355 Points

Definitely had both alt and src in my code. However I see you have the begining and end list element on one line - mine were paragraphed and also anchored perhaps I wasn't meant to anchor them yet ?

HI Sean,

The challenges can get quite specific.

Some times if it asks you to enter an image that you know if already there it could be a few other things causing this.

If you have wrapped the image tags in an anchor tag for example and the challenge hasn't asked for this it may be seen as incorrect and display that error.

Hope that helps narrow it down.

EDIT: Submitted this at the same time you've submitted your answer but judging by your comment it sounds as though the anchor tag could be the issue.

-Rich

Sean Powell
Sean Powell
355 Points

Thanks guys I think that may be it - I was copying the code from my worksheet which already had the anchors in place and I don't think the challenge task was asking me for that just yet. Will try it again and see. Many thanks for all the help. :)

No problem. Hopefully that will sort it for you :)

-Rich

Damien Watson
Damien Watson
27,419 Points

I've done that once or twice before... glad it's sorted :)

Sean Powell
Sean Powell
355 Points

Yes! It worked - I was adding in the anchor code when I wasn't supposed to be! Blonde moment. Thanks all for your help!