Build a Travel Agency Page - Build a Travel Agency Page

Tell us what’s happening:

Apparently the figcaption element should be a second child to the figure element…Nothing I try changes the situation…Any ideas

Your code so far

<!DOCTYPE html>
<html lang="en">
<head> <meta charset="utf-8" name="description" content="Travel"> <title>Travel Agency Page</title></meta>
<meta></meta></head>
<body>
<h1>Magical Kenya</h1>
<p>Visit the famous Maasai Mara</p>
<h2>Packages</h2>
<P>Popular destinations at an affordable rate.</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 alt="GG" src="https://cdn.freecodecamp.org/curriculum/labs/colosseo.jpg"></img>
      <figcaption>The ruins</figcaption></a></figure>
  <figure><a href="https://www.freecodecamp.org/learn" target="_blank" ><img alt="gg" src="https://cdn.freecodecamp.org/curriculum/labs/alps.jpg"></img><figcaption>The mountains</figcaption></a></figure>
  <figure><a href="https://www.freecodecamp.org/learn" target="_blank"><img alt="gg" src="https://cdn.freecodecamp.org/curriculum/labs/sea.jpg"><figcaption>Mombasa holidays </figcaption></img></a></figure>
  </body>
  </html>

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/142.0.0.0 Safari/537.36

Challenge Information:

Build a Travel Agency Page - Build a Travel Agency Page

Hi @fujji and welcome to our community!

The formatting of your code makes it a little difficult to debug.

It would be worth running it through an HTML formatter to make it more legible.

Essentially, you should have figure elements, each with an anchor (a) element and figcaption element nested inside. Your img elements should be nested inside the anchor elements. (The figcaption elements should NOT be nested inside the anchor elements).

Ensure also that all of your elements have the correct opening and closing tags, except for img which is self-closing and only needs one tag.

1 Like