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

I am having trouble with this Code Challenge. Are these not img tags?

I have cross referenced this many times with the tutorial video itself and still I get the "Bummer" message. Any help would be appreciated.

I have a screenshot, but I do not see where I can attach it.

the Bummer message is: Make sure you include an image tag that displays "numbers-01.jpg"

Thanks.

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>
          <img src="img/numbers-01.jpg" alt"">
        </li>
        <li>
          <img src="img/numbers-02.jpg" alt"">
        </li>
        <li>
          <img src="img/nubers-06.jpg" alt"">
        </li>
      </ul>
    </section>
    <footer>
      <p>&copy; 2013 Nick Pettit.</p>
    </footer>
  </body>
</html>
Jesus Mendoza
Jesus Mendoza
23,289 Points

Hey James, you're missing a "=" next to alt, it should be alt=""

David Perkins
David Perkins
9,607 Points

What Jesus Mendoza says and also maybe a "/" before the end of the img. So something like this...

<img src="img/numbers-01.jpg" alt="Alt Text" />

8 Answers

You dont have to add img/ before the images files. just the files will do.

David Perkins
David Perkins
9,607 Points

I didn't think you did, but i also didn't know if the Treehouse code challenge required it or not?

Nick Pettit
Nick Pettit
Treehouse Teacher

James Wilson, I believe this is the correct answer. Have you tried removing img/ from your src attributes? The images are not inside of folders.

Jesus Mendoza
Jesus Mendoza
23,289 Points

You also have a typo on numbers-6.jpg

Jason Anders
MOD
Jason Anders
Treehouse Moderator 145,860 Points

Hey James,

I'm not sure if you solved it already or not, but if you follow all the advice above, the code will pass. You just need to add the equal (=) signs in your alt attribute. Then fix the spelling error in the 3rd image (numbers-06), and finally delete the img/ prefix you have (the challenge didn't say anything about the files being in a separate 'img' folder.

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

Keep Coding! :)

Thanks for all you replies. I have now tried all three with no luck.

Please keep the suggestions coming

I have a screenshot of the tutorial video if someone can advise me how to post it here.

Oddly enough- the code I wrote in Workspace works when I preview it.

If you want to do an equivalent to what Shadrack is saying put ../ before img/ and file name. I don't remember if the challenge wants you to know img is the folder and code as if you are in the folder that is holding img or not. So you could try '../img/numbers-01.jpg' or '/img/numbers-01.jpg', I think the ../ version is supposed to be the better version for future code portability. When you play with the command prompt you can see the ../ pushes you back you level, so if you are at the img level ../img/ brings you back to where you left. Note in the newer CSS classes the single quotes are used, but I think early on I might have done some lines with the double quotes like you did at least some of the time.

Side note: If you are a geek you would probably remember Slashdot /. is used when changing directories to quickly jump to the root directory, something you would probably not want to put in your directory paths for security and portability reasons.

Thanks everyone. I have tried every suggestion in this post to no avail. I have contacted Treehouse customer support and will report back with my findings.

It finally worked.

Apparently it all hung in the balance of closing the img tag (a self closing tag) with the forward slash />

However- I have looked at the video over and over and the img tags were not closed with the forward slash. Hence my incorrect answer (and frustration).

Thanks to all who took the time to answer this post.