Tell us what’s happening:
please i need help with step 26,28 and 32.. i have tried in different ways
Your code so far
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8"/>
<title>Travel Agency Page</title>
<meta
name="description"
content="getting there"
/>
</head>
<body>
</body>
<h1>Travel destination</h1>
<p>travel opportunities</p>
<h2>Packages</h2>
<p>various packages</p>
<ul>
<li><a href="https://www.freecodecamp.org/learn">Group Travels</a></li>
<li><a href="https://www.freecodecamp.org/learn">Private Tours</a></li>
</ul>
<h2>Top Itineraries</h2>
<figure>
<a href="https://www.freecodecamp.org/learn"><figcaption>some text</figcaption><img src="https://cdn.freecodecamp.org/curriculum/labs/colosseo.jpg" alt="broken"</a>
</figure>
<figure>
<a href="https://www.freecodecamp.org/learn"><figcaption>some text</figcaption><img src="https://cdn.freecodecamp.org/curriculum/labs/alps.jpg" alt="valley"</a>
</figure>
<figure>
<a href="https://www.freecodecamp.org/learn"><figcaption>some text</figcaption><img src="https://cdn.freecodecamp.org/curriculum/labs/sea.jpg" alt="sea"</a>
</figure>
</html>
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36
Challenge Information:
Build a Travel Agency Page - Build a Travel Agency Page
These are the failing tests:
26. Each figure element should contain a figcaption element as its second child.
28. Each of the a elements that are children of your figure elements should contain an image.
32. Each a element should have a target attribute with the value of _blank. Don't forget the links in the list items.
What is the second child in this figure element?
Also, can you spot an issue with the syntax of the img element?
will you see my updated ones after editing?
having to keep trying leads to making another mistake sometimes… that is what i’m facing
If you have updated your code, please share the updated code here.
Do i copy and paste it here or there is a better way?
When you enter a code block into a forum post, please precede it with three backticks to make it easier to read.
You can also use the “preformatted text” tool in the editor (</>) to add the backticks.
See this post to find the backtick on your keyboard.
Note: Backticks (`) are not single quotes (').
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8"/>
<title>Travel Agency Page</title>
<meta
name=“description”
content=“getting there”
/>
</head>
<body>
</body>
<h1>Travel destination</h1>
<p>travel opportunities</p>
<h2>Packages</h2>
<p>various packages</p>
<ul>
<li><a href="https://www.freecodecamp.org/learn">Group Travels</a></li>
<li><a href="https://www.freecodecamp.org/learn">Private Tours</a></li>
</ul>
<h2>Top Itineraries</h2>
<figure>
<a href="https://www.freecodecamp.org/learn"><img src="https://cdn.freecodecamp.org/curriculum/labs/colosseo.jpg" alt="broken"</a>
<figcaption>some text</figcaption>
</figure>
<figure>
<a href="https://www.freecodecamp.org/learn"><img src="https://cdn.freecodecamp.org/curriculum/labs/alps.jpg" alt="valley"</a>
<figcaption>some text</figcaption>
</figure>
<figure>
<a href="https://www.freecodecamp.org/learn"><img src="https://cdn.freecodecamp.org/curriculum/labs/sea.jpg" alt="sea"</a>
<figcaption>some text</figcaption>
</figure>
</html>
Ok, you’ve fixed the ‘second child’ issue but you still have a syntax issue with your img elements. They are missing something.
Also, you need to address the final failing test (target attributes).
The second child issue is confusing, i moved it up earlier cos it didn’t pass when i ran the test..
the target position is another thing … i will input and show you
The syntax issue with the img elements could also be throwing off other tests, like the ‘second child’ one.
<meta charset="UTF-8"/>
Travel Agency Page
<meta
name=“description”
content=“getting there”
/>
</body>
<h1>Travel destination</h1>
<p>travel opportunities</p>
<h2>Packages</h2>
<p>various packages</p>
<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>
<h2>Top Itineraries</h2>
<figure>
<a href="https://www.freecodecamp.org/learn" target="\_blank"><img src="https://cdn.freecodecamp.org/curriculum/labs/colosseo.jpg" alt="broken"</a>
<figcaption>some text</figcaption>
</figure>
<figure>
<a href="https://www.freecodecamp.org/learn" target="\_blank"><img src="https://cdn.freecodecamp.org/curriculum/labs/alps.jpg" alt="valley"</a>
<figcaption>some text</figcaption>
</figure>
<figure>
<a href="https://www.freecodecamp.org/learn" target="\_blank"><img src="https://cdn.freecodecamp.org/curriculum/labs/sea.jpg" alt="sea"</a>
<figcaption>some text</figcaption>
</figure>
‘‘‘
i fixed the target
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8"/>
<title>Travel Agency Page</title>
<meta name=“description” content=“getting there” />
</head>
<body> </body>
<h1>Travel destination</h1>
<p>travel opportunities</p>
<h2>Packages</h2>
<p>various packages</p>
<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>
<h2>Top Itineraries</h2>
<figure>
<a href="https://www.freecodecamp.org/learn" target="\_blank"><img src="https://cdn.freecodecamp.org/curriculum/labs/colosseo.jpg" alt="broken"</a>
<figcaption>some text</figcaption>
</figure>
<figure>
<a href="https://www.freecodecamp.org/learn" target="\_blank"><img src="https://cdn.freecodecamp.org/curriculum/labs/alps.jpg" alt="valley"</a>
<figcaption>some text</figcaption>
</figure>
<figure>
<a href="https://www.freecodecamp.org/learn" target="\_blank"><img src="https://cdn.freecodecamp.org/curriculum/labs/sea.jpg" alt="sea"</a>
<figcaption>some text</figcaption>
</figure>
</html>
abidemiwork:
target="\_blank"
This isn’t quite right.
Each a element should have a target attribute with the value of _blank.
Also, you still need to fix the img element syntax.
maybe i didn’t paste it well, that is not how my target is and it already passed in the test…. please what am i getting wrong in the img element syntax
<meta charset="UTF-8"/>
Travel Agency Page
<meta
name=“description”
content=“getting there”
/>
</body>
<h1>Travel destination</h1>
<p>travel opportunities</p>
<h2>Packages</h2>
<p>various packages</p>
<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>
<h2>Top Itineraries</h2>
<figure>
<a href="https://www.freecodecamp.org/learn" target="\_blank"><img src="https://cdn.freecodecamp.org/curriculum/labs/colosseo.jpg" alt="broken"</a>
<figcaption>some text</figcaption>
</figure>
<figure>
<a href="https://www.freecodecamp.org/learn" target="\_blank"><img src="https://cdn.freecodecamp.org/curriculum/labs/alps.jpg" alt="valley"</a>
<figcaption>some text</figcaption>
</figure>
<figure>
<a href="https://www.freecodecamp.org/learn" target="\_blank"><img src="https://cdn.freecodecamp.org/curriculum/labs/sea.jpg" alt="sea"</a>
<figcaption>some text</figcaption>
</figure>
‘‘‘
Every html tag needs < and >. Your img tags are missing something.
2 Likes
i added < before every img but didn’t close cos it removes the link on the figcaption everytime i did
i closed the img elements and it passed .. thanks
2 Likes