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

Travis Bentz
Travis Bentz
640 Points

How do i correct an answer that once corrected, negates the correct answer of the previous task?

Here is my current code. The previous question asks me to create 3 empty line items. the next questions tells me to input those pictures without using links or anything else. I am stumped

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

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

3 Answers

Steven Parker
Steven Parker
229,787 Points

Syntax errors will often invalidate the previous work.

In this case you have two issues:

  • open tags ("<li>") that do not have matching closing tags ("</li>")
  • img (img) tags that are missing the first angle bracket ("<")

Be sure that each of the list items you add are represented by a matched pair of tags ("<li></li>"). Then, when you add your image tags between the list item tag pairs, be sure that each tag has the proper symbol to begin it ("<img...", not "img..."). So, for example, a completed line for task 2 might look like this:

        <li><img src="img/numbers-01.jpg"></li>
Henrietta Voross
Henrietta Voross
Courses Plus Student 1,218 Points

I have the same issue with this challenge simply because task #2 negates task #1 even with correct syntax and everything as advised in prev.answer. Can you change the insructions on task #1 so that it does not include the line "This will become an image gallery, but don’t fill in the list items just yet." as this does not allow then in task #2 to fill in the list with the pictures. <section> <nav> <ul> <li> <a href="img/numbers-01.jpg"> <img src="img/numbers-01.jpg" alt=""> </a> </li> <li> <a href="img/numbers-02.jpg"> <img src="img/numbers-02.jpg" alt=""> </a> </li> <li> <a href="img/numbers-06.jpg"> <img src="img/numbers-06.jpg" alt=""> </a> </li> </ul> </nav> </section>

Steven Parker
Steven Parker
229,787 Points

I'm just a student like yourself, I can't change anything about the course. But I can assure you that I have taken this challenge myself and passed both tasks by following the instructions.

I see that in the code you included above you have links around the images, but I believe the challenge asks for only images.

Travis Bentz
Travis Bentz
640 Points

Thank you Steven! From that little bit I then figured out that the editor actually tells me what is wrong! I'm new so I didn't get that at first. Thanks again!

Henrietta Voross
PLUS
Henrietta Voross
Courses Plus Student 1,218 Points

Steven, I would be happy to show you my code and the error I get, which is the same as here. I cant find where is the problem with it, if there is one, and so I will just never be able to pass this test :D I dont think it is a coincidence that 2 people have the same issue with this challenge. Apparently an issue we will never solve, cause noone can check our work from Treehouse...

Steven Parker
Steven Parker
229,787 Points

It's no coincidence — your issues are quite different:

  • the challenge asked you to add just a ul with three items, but you also have a nav element enclosing them.
  • the challenge says, "don’t add any captions or links. Just the images!" — but you have links around your images.

In the future, to enable the most complete and accurate analysis, always create a fresh question, show your properly formatted code, and include a link to the course page you were working with.

Use the instructions for code formatting in the Markdown Cheatsheet pop-up below the "Add an Answer" area. :arrow_heading_down:

Henrietta Voross
PLUS
Henrietta Voross
Courses Plus Student 1,218 Points

Hi Steven, thanks. Removed nav and links and it works fine now. I was mostly confused by the error message saying task #1 is no longer valid. Anyways, thanks for the help, problem solved!:)