Hey guys, I’m new to coding and this forum so I apologize if I do something wrong as far as posting this goes. I’m doing the 2nd lab “Building a travel agency page” and I’ve been stuck on 18. “Both your list items should contain an anchor element.” for two days, I’ve written it three times, ran it through chat gpt, and looked at y’alls different examples and its still saying its incorrect. please help me and thank you so much! (P.S. I this is the part that I’m having an issue with, I’m not entirely sure)
<ul>
<li><a href="https://www.freecodecamp.org/learn" target="_blank">Group Travels</a></li>
<li><a href="https://www.freecodecamp.org/learn" target="_blank">Private Tours</a></li>
</ul>
Hi there. Did you have any other anchor elements in your content, except above two?
Post your full html file and link to the challenge step.
It wouldn’t let me post the whole length of code because this is my first post but i have them in all of my list items but here let me try to post the whole thing again
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>World's Best Travel Agency</title>
</head>
<body>
<h1>Travel The World!</h1>
<p>Travel Opportunities:</p>
<h2>Packages</h2>
<p>Great packages at an affordable price:</p>
<ul>
<li><a href="https://www.freecodecamp.org/learn" target="_blank">Group Travels</a> for minimum 5 persons</li>
<li><a href="https://www.freecodecamp.org/learn" target="_blank">Private Tours</a> for VIP</li>
</ul>
<h2>Top Itineraries</h2>
<ol>
<li>
<figure>
<a href="https://www.freecodecamp.org/learn" target="_blank">
<img src="https://cdn.freecodecamp.org/curriculum/labs/colosseo.jpg" alt="Colosseo in Rome">
</a>
<figcaption>Colosseo in Rome</figcaption>
</figure>
</li>
<li>
<figure>
<a href="https://www.freecodecamp.org/learn" target="_blank">
<img src="https://cdn.freecodecamp.org/curriculum/labs/alps.jpg" alt="The Alps">
</a>
<figcaption>Hiking in The Alps</figcaption>
</figure>
</li>
<li>
<figure>
<a href="https://www.freecodecamp.org/learn" target="_blank">
<img src="https://cdn.freecodecamp.org/curriculum/labs/sea.jpg" alt="Ocean picture">
</a>
<figcaption>Sailing in the deep blue</figcaption>
</figure>
</li>
</ol>
</body>
</html>
@ hasanzaib1389 it let me post it in the comments but not the initial post
Remove the extra text from li elements that aren’t asked to add in the challenge instructions.
ILM
January 27, 2025, 2:55pm
8
when you ask for help it would be great if you could share the link to the challenge, it makes helping you much easier (or use the HELP button)
these li
elements do not have an a
as first children so the tests are failing.
You are not asked to add li
elements here
which li elements are you referring to?
Except the above two, all li
element didn’t have anchor element as it’s first child element.
Don’t use li
element around figure
elements.
ILM
January 27, 2025, 6:30pm
11
those in the ol
element that are in the quote