Tell us what’s happening:
I’m stuck on 20, 21 and 26. I really don’t know what’s going on and everything seems good, I’ really get confused by the anchor element but so far it seems that my scprit is equal to every other in the forum.
Your code so far
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Travel Agency Page</title>
<link rel="stylesheet" href="./styles.css" />
<meta name="description" content="Come visit the astonishing city of Tokyo" />
<meta property="og:title" content="Visitokioo.com">
</head>
<body>
<main>
<h1>Visit Tokio!</h1>
<p>
Tokyo offers a seemingly unlimited choice of shopping, entertainment, culture and dining to its visitors. The city's history can be appreciated in districts such as Asakusa and in many excellent museums, historic temples and gardens. Contrary to common perception, Tokyo also offers a number of attractive green spaces in the city center and within relatively short train rides at its outskirts.
</p>
<h2>Packages</h2>
<p>They are different oportunities that you can get by flying with our company:</p>
<ul>
<li><a href=https://www.freecodecamp.org/learn target="_blank">Private tours</a></li>
<li><a href=https://www.freecodecamp.org/learn target="_blank">Group travels</a></li>
</ul>
<h2>Top Itineraries</h2>
<figure>
<a href="https://www.freecodecamp.org/learn" target="_blank">
<img src="https://www.japan-guide.com/g22/740/3004_03.jpg" alt="Asakusa, the district with an atmosphere of old Tokyo">
<figcaption>District with an atmosphere of old Tokyo</figcaption>
</a>
</figure>
<figure>
<a href="https://www.freecodecamp.org/learn" target="_blank">
<img src="https://www.japan-guide.com/g18/740/3064_01a.jpg" alt="Tokyo Skytree, 634 meter tall tower with observation decks">
<figcaption>634 meter tall tower with observation decks</figcaption>
</a>
</figure>
<figure>
<a href="https://www.freecodecamp.org/learn" target="_blank">
<img src="https://www.japan-guide.com/g18/740/3006_02.jpg" alt="Harajuku, center of teenage fashion and cosplay culture">
<figcaption>Center of teenage fashion and cosplay culture</figcaption>
</a>
</figure>
</main>
</body>
</html>
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/139.0.0.0 Safari/537.36
Challenge Information:
Build a Travel Agency Page - Build a Travel Agency Page
Hi @Gonarxys and welcome to our community!
These are the tests which you are failing:
20. The anchor element of your first list item should wrap the text Group Travels
.
21. The anchor element of your second list item should wrap the text Private Tours
.
26. Each figure
element should contain a figcaption
element as its second child.
Check the text of your first li
element. Does it match the above text?
Same for your second li
element.
What is the second child of each figure
element?
Hello, and thank you so much for your help! The first few were actually just a distraction 😅
Now, I really don't understand what a second child is. I thought it was the order of the figurecaption and the img src, but when I do that, I still get step 26 and 28 incomplete... Does a second child have anything to do with tabs or I'm just missing something else?
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Travel Agency Page</title>
<link rel="stylesheet" href="./styles.css" />
<meta name="description" content="Come visit the astonishing city of Tokyo" />
<meta property="og:title" content="Visitokioo.com" />
<style> .menu li a{
display: inline;
white-space: normal;
overflow-wrap: anywhere;
word-break: normal;
}
.menu li {min-width:0;}
</style>
</head>
<body>
<main>
<h1>Visit Tokio!</h1>
<p>
Tokyo offers a seemingly unlimited choice of shopping, entertainment, culture and dining to its visitors.
The city's history can be appreciated in districts such as Asakusa and in many excellent museums, historic
temples and gardens. Contrary to common perception, Tokyo also offers a number of attractive green spaces in
the city center and within relatively short train rides at its outskirts.
</p>
<h2>Packages</h2>
<p>They are different opportunities that you can get by flying with our company:</p>
<ul class="menu">
<li><a href="https://www.freecodecamp.org/learn" target="_blank" style="text-wrap-mode: wrap;">Group Travels</a></li>
<li><a href="https://www.freecodecamp.org/learn" target="_blank" style="text-wrap-mode: wrap;">Private Tours</a></li>
</ul>
<h2>Top Itineraries</h2>
<figure>
<a href="https://www.freecodecamp.org/learn" target="_blank">
<figcaption>District with an atmosphere of old Tokyo</figcaption>
<img src="https://www.japan-guide.com/g22/740/3004_03.jpg"
alt="Asakusa district with an atmosphere of old Tokyo">
</a>
</figure>
<figure>
<a href="https://www.freecodecamp.org/learn" target="_blank">
<figcaption>634 meter tall tower with observation decks</figcaption>
<img src="https://www.japan-guide.com/g18/740/3064_01a.jpg"
alt="Tokyo Skytree, a 634 meter tall tower with observation decks">
</a>
</figure>
<figure>
<a href="https://www.freecodecamp.org/learn" target="_blank">
<figcaptionn>Center of teenage fashion and cosplay culture</figcaption>
<img src="https://www.japan-guide.com/g18/740/3006_02.jpg"
alt="Harajuku, center of teenage fashion and cosplay culture">
</a>
</figure>
</main>
</body>
</html>
A child element is one which is nested inside another (parent) element. Elements which are nested to the same level are known as sibling elements.
EXAMPLE:
<div id="container">
<h2 id="title">This is the first child of the container</h2>
<p id="description">This is the second child of the container</p>
<a id="image-link"><img src='/' alt="some image or other"></a>
</div>
Note that the h2
, p
and a
elements above are all children of the div
and are siblings of each other. However, the img
is a child of the a
(not of the div
).
Your figure
element contains only one child (which itself has two child elements, figcaption
and img
).
In short, your figcaption
needs to be the second child of the figure
element, so shouldn’t be nested inside the a
element.
I got it! Thank you so much 
1 Like