Build a Travel Agency Page - Build a Travel Agency Page

Tell us what’s happening:

I cannot pass tests #26 and #28 and I cannot tell why. I am especially confused with #28 as it seems that figcaption is the second element. I’m sure that I must be missing something obvious and any help would be appreciated

Your code so far

<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8">
    <title> Travel Agency Page </title>
    <meta name="description"  content="A Travel Agency With Great Prices!">   
  </head>
  <body>
    <h1> ROME! GREECE! PARIS! - <em> JJ HOLIDAYS </em> </h1>
    <p> With JJ holidays you can fly to many classic destinations for an unbeatable price! </p>

    <h2> Packages </h2>
    <p> Embark on an incredible journey with your friends or as a solo traveller </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"> 
      <figcaption> The colloseum </figcaption>
    <img src="https://cdn.freecodecamp.org/curriculum/labs/colosseo.jpg" alt="A image of the colloseum"> 
    </a>
    </figure>

    <figure>
    <a href="https://www.freecodecamp.org/learn" target="_blank">
    <figcaption> The Alps </figcaption>
     <img src="https://cdn.freecodecamp.org/curriculum/labs/alps.jpg" alt= "an image of the Alps">  
      </a>
    </figure>
    
    <figure>
    <a href="https://www.freecodecamp.org/learn" target="_blank"> 
     <figcaption> The sea </figcaption>
    <img src="https://cdn.freecodecamp.org/curriculum/labs/sea.jpg" alt="An image of the sea"> 
    </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/140.0.0.0 Safari/537.36

Challenge Information:

Build a Travel Agency Page - Build a Travel Agency Page

what element is a direct child of figure? there is only one

isnt everything between and a child of figure? What do i need to do to make and a direct child

Check the results of running your code through this HTML validator. That should help you understand what’s going on.

you need to make them not a child of a

But the task was to make it the 2nd child? Sorry i still dont understand. Could you upload the solution/correct code. I think ill understand better where i went wrong after seeing that

no, we are not allowed to do that

your a element has inside figcaption and img, that means that figcaption is a child of a, not of figure, so it cannot be the second child of figure

if this is confusing you may want to review what it means for elements to be children, parents, siblings, descendants and ancestors of other elements

Yeah i’ve fixed the issue now, thanks for the help

That’s great! This one was a real brain burner, trying to get it right my first time. Great job at getting it to pass and sticking with it.