Tell us what’s happening:
having challenges with the anchor and figure and figure captions
steps 2, 3, 8, 9, 26, 27, 28, now 31 and 32. I can’t figure what I’ve done wrong. Or where to look to learn how to improve it
Your code so far
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="description" content="Travel Agency Page"
<title>Best Travel Agency</title>
</head>
<body>
<h1>Travel Opportunities</h1>
<p>So many Travel Opportunities to choose from. </p>
<h2>Packages</h2>
<p>Best packages around the globe</p>
<ul>
<li>
<a>Group Travels</a></li>
<li><a>Private Tours</a></li>
</ul>
<h2>Top Itineraries</h2>
<a href="https://www.freecodecamp.org/learn" target="_blank"<a/>
<figure>
<a href="https://www.freecodecamp.org/learn" target="_blank">
<figurecaption>Join us</figurecaption>
<img src="https://cdn.freecodecamp.org/curriculum/labs/colosseo.jpg" alt="colleseo">
</figure>
<figure>
<a href="https://www.freecodecamp.org/learn" target="_blank">
<figurecaption>Most Amazing Ski Adventure</figurecaption>
<img src="https://cdn.freecodecamp.org/curriculum/labs/alps.jpg" alt="alps">
</figure>
<figure>
<a href="https://www.freecodecamp.org/learn" target="_blank">
<figurecaption>Most Amazing Seascape</figurecaption>
<img src="https://cdn.freecodecamp.org/curriculum/labs/sea.jpg" alt="seascapes">
</figure>
</body>
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/135.0.0.0 Safari/537.36
Challenge Information:
Build a Travel Agency Page - Build a Travel Agency Page
Hi,
Welcome to the community!
Make sure your html element has a closing tag.
Take a look at your second meta element.
The element’s name is figcaption
, not figurecaption
.
Make sure you have closing anchor tags inside your figure elements and that the anchor elements should only contain the img element.
I hope this helps!
1 Like
You arent closing the anchor ta properly <a></a>
yours is <a><a/>
so you should change that
1 Like
Thanks!
I tried closing tag on html won’t accept.
Do you mean that I should take out the a href? and just have img?
Yeah you need to make sure you have closing tags for the anchor element. I don’t see them now.
You should have the img inside the anchor element and the figcaption element should be outside the anchor element.
Also, what’s the purpose of this line below your h2 element:
<a href="https://www.freecodecamp.org/learn" target="_blank"<a/>
You can remove it.
You can share your code once you try and it doesn’t work.
Good luck!
THank you, I was very confused with the order. Now seems to work. taking the figcaption out of the anchor.
Now 2, 3, and 9 still giving me a big challenge. All seems correct
Best Travel Agency
Travel Opportunities
So many Travel Opportunities to choose from.
Packages
Best packages around the globe
Top Itineraries
Join us
Most Amazing Ski Adventure
Most Amazing Seascape
I shared code on new thread. thanks
Tell us what’s happening:
html element lang en is incorrect but I cannot figure out why. I even closed the tab and still doesn’t work. Step 2, 3, and 9 have stumped me. Any suggestions?
Your code so far
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="description" content="Travel Agency Page">
<title>Best Travel Agency</title>
</head>
<body>
<h1>Travel Opportunities</h1>
<p>So many Travel Opportunities to choose from. </p>
<h2>Packages</h2>
<p>Best packages around the globe</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="colleseo"></a>
<figcaption>Join us</figcaption>
</figure>
<figure>
<a href="https://www.freecodecamp.org/learn" target="_blank"> <img src="https://cdn.freecodecamp.org/curriculum/labs/alps.jpg" alt="alps"></a>
<figcaption>Most Amazing Ski Adventure</figcaption>
</figure>
<figure>
<a href="https://www.freecodecamp.org/learn" target="_blank"> <img src="https://cdn.freecodecamp.org/curriculum/labs/sea.jpg" alt="seascapes"></a>
<figcaption>Most Amazing Seascape</figcaption>
</figure>
</body>
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/135.0.0.0 Safari/537.36
Challenge Information:
Build a Travel Agency Page - Build a Travel Agency Page
<html lang="en" like thi?
ILM
May 2, 2025, 1:39pm
12
how are you trying to close the element?
ILM
May 2, 2025, 1:41pm
13
I have merged your two topics, do not open multiple topics for the same labs
head
and body
are HTML elements. They have opening and closing tags. <body></body>
and <head></head>
html
is the same.
Can you share your latest code?
THanks so much I figured it out!! I had to open the entire html and close the entire html not just that one line. Everyone helped me so much. thanks
2 Likes