Build a Travel Agency Page - Build a Travel Agency Page

Tell us what’s happening:

  1. Each figure element should contain a figcaption element as its second child.
  2. Each of the a elements that are children of your figure elements should contain an image.
  3. Each a element should have an href attribute with the value of https://www.freecodecamp.org/learn. Don’t forget the links in the list items.
  4. Each a element should have a target attribute with the value of _blank. Don’t forget the links in the list items.

Your code so far

<!DOCTYPE html>
<html lang="en">
    <head>
      <meta charset="utf-8">
      <title> Travel Agency Page</title>
      <meta name="description" content="Affordable holiday packages for everyone"/>
    </head>
    <body>
      <h1>Travel Destinations</h1>
      <p>Travel Opportunities</p>
      <h2>Packages</h2>
      <p>Various packages</p>
      <ul>
       <li><a href="https://www.freecodecamp.org/learn" target="_blank">Group Travels</li></a>
       <li><a href="https://www.freecodecamp.org/learn" target="_blank">Private Tours</li></a>
      </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="colosseo"><a/>
        <figcaption>historical building</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>famous mountains</figcaption>
      </figure>
      <figure>
        <a href="https://www.freecodecamp.org/learn" target="_blank">
        <img src="https://cdn.freecodecamp.org/curriculum/labs/sea.jpg" alt="sea"></a>
        <figcaption>charming view</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/137.0.0.0 Safari/537.36

Challenge Information:

Build a Travel Agency Page - Build a Travel Agency Page

Please Tell us what’s happening in your own words.

Learning to describe problems is hard, but it is an important part of learning how to code.

Also, the more you say, the more we can help!

2 posts were split to a new topic: Parent/child elements

Hi, it says figcaption is not positioned as a second child but I have tried to put it after 'a href… and before target, then I tried putting it as line two after the whole 'a href line, then I tried putting a href + img src in continuous line and close the ‘a’ and then put the figcaption , I’ve tried so many variations and none of them passed. Could you pls have a look at my code above and guide me through what’s wrong?

It turned out that the code was all correct, it did not pass due to one of the A being closed incorrectly I had it as a/ instead of /a
All resolved

I do not understand what you mean, you can’t put a tag inside an other tag

do you think the syntax here is correct?