Build a Travel Agency Page - Build a Travel Agency Page 26&28

Tell us what’s happening:

I am stuck on #26 Each figure element should contain a figcaption element as its second child. I’ve compared my code to many others on the forum and can’t figure out what the problem is. I also am stuck on #28 Each of the a elements that are children of your figure elements should contain an image. Am I missing an image? I thought I linked it correctly I am not sure whats happening here.

Your code so far

<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="description" content="Discover the vast beauty of Japan with the worlds most efficient travel agency today!" />
    <title>Travel Agency Page</title>
    </head>

    <body>
  <section>
    <h1>Adventure Awaits in Japan</h1>
    <p>Your time in Japan will be a breeze with hotels covered, a tailored itinerary, and experiences ranging from adventurous hikes to pure relaxation at spas. The choice is yours!</p>
    </h1>
  </section>

  <section>
    <h2>Packages</h2>
    <p>Whether you prefer to vacation on the beach with family or hop from district to district solo, we got you covered.</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="Roman Colosseom"/>  
      <figcaption>colosseom building</figcaption>
        </figure>
      
      <figure>
        <a href="https://www.freecodecamp.org/learn" target="_blank">
        <img src="https://cdn.freecodecamp.org/curriculum/labs/alps.jpg" alt="Swiss Alps"/>
        <figcaption>alps mountains</figcaption>
      </figure>

      <figure>
        <a href="https://www.freecodecamp.org/learn" target="_blank">
        <img src="https://cdn.freecodecamp.org/curriculum/labs/sea.jpg" alt="Open Ocean"/>
        <figcaption>cool sea with yacht</figcaption>
      </figure>


</body>
</html>

Your browser information:

User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/134.0.0.0 Safari/537.36

Challenge Information:

Build a Travel Agency Page - Build a Travel Agency Page

Hi @bingbong

The anchor elements nesting the img elements are missing a closing tag.

Happy coding

Hello!
Were you referring to the a href line not having the / closing tag at the end? Im still getting ticked off for 26 and 28. ):

It looks like you’re really close! The main issue is that your <figcaption> should come after the <img> but inside the <a>. Right now, your <figcaption> is placed outside the <a>. Try moving each <figcaption> so it stays inside the <a> tag, right after the <img>. That should fix both #26 and #28!

1 Like

Nope. @Teller called it. The image is supposed to be a link. Once the anchor tag is closed, then figcaption becomes the second child.

no, they are literally missing the closing tag, anchor elements are not void elements, they need a closing tag