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 trialTravis Bentz
640 PointsHow 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>
<!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>© 2013 Nick Pettit.</p>
</footer>
</body>
</html>
3 Answers
Steven Parker
231,198 PointsSyntax 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
Courses Plus Student 1,218 PointsSteven, 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
231,198 PointsIt's no coincidence β your issues are quite different:
- the challenge asked you to add just a
ul
with three items, but you also have anav
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.
Henrietta Voross
Courses Plus Student 1,218 PointsHi 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!:)
Henrietta Voross
Courses Plus Student 1,218 PointsHenrietta Voross
Courses Plus Student 1,218 PointsI 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
231,198 PointsSteven Parker
231,198 PointsI'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
640 PointsTravis Bentz
640 PointsThank 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!