Build a Travel Agency Page - Build a Travel Agency Page Test 32

Tell us what’s happening:

“Failed:32. Each a element should have a target attribute with the value of _blank. Don’t forget the links in the list items.”

It’s literally this one thing that I am stuck on and I don’t understand it because the target=“_blank” attribute is there on the link items but the test is saying it’s not there, everything has passed minus this one thing and I have tried moving the target=“_blank” attribute next to the a href and after but to no success, please help as it’s so frustrating :sob:

Your code so far

<!DOCTYPE html>
<html lang="en">
  
<head>
  <meta charset="UTF-8">
  <meta name="description" content="Travel agency page detailing activities do to in Jamaica">
  <title>Travel Agency Page</title>
</head>

<body>
  <h1>🇯🇲 Discover Jamaica 🇯🇲</h1>

  <p>Come Discover Jamaica, a country of sun-drenched beaches, warm tropical breezes and rich cultural heritage.</p>

  <h2>Packages</h2>

  <p>We offer an extensive range of holiday solutions to accommodate the needs of all our clients. From daily excursions in the most beautiful cities, to thorough tours of hidden villages and beach towns to discover Jamaica's most famous areas.</p>

  <ul>

    <li><a target="_blank" href="https://www.freecodecamp.org/learn">Group Travels</a></li>

    <li><a target="_blank" href="https://www.freecodecamp.org/learn" >Private Tours</a></li>

  </ul>

  <h2>Top Itineraries</h2>

  <figure>
    <a href="https://www.freecodecamp.org/learn"><img src="https://cdn.freecodecamp.org/curriculum/labs/colosseo.jpg" alt="rocky waterfall surrounded by palm trees" target="_blank"></a>
    <figcaption>colusseum</figcaption>
  </figure>
  
  <figure>
      <a href="https://www.freecodecamp.org/learn"><img src="https://cdn.freecodecamp.org/curriculum/labs/sea.jpg" alt="rocky waterfall surrounded by palm trees" target="_blank"></a>
    <figcaption>the sea </figcaption>
  </figure>
  
  <figure>
      <a href="https://www.freecodecamp.org/learn"><img src="https://cdn.freecodecamp.org/curriculum/labs/alps.jpg" alt="rocky waterfall surrounded by palm trees" target="_blank"></a>
    <figcaption>the mountains</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

Welcome to the forum @cnzundu

  1. Each a element should have a target attribute with the value of _blank . Don’t forget the links in the list items.

Are all the target attributes in the anchor elements?

Happy coding

1 Like

Hey thank you for replying and yes they are as you can see here, i’ve even tried adding it to the end of the link and its the same issue :

  • Group Travels
  • <li><a target="_blank" href="https://www.freecodecamp.org/learn" >Private Tours</a></li>
    

    How about the anchor elements nested in the figure elements?

    " Passed:25. Each figure element should contain an anchor element as its first child."
    That one has passed the test

    Do the figure anchor elements contain a target attribute?
    Also, test 25 is checking for an element.

    Yes, the figure anchors have the target attribute and that seems to have passed fine, the issue is with the target attribute with the listed items. I can’t tell if it’s a bug or something I’m doing wrong.

    I don’t see any target attributes in the figure anchor elements.
    I do see them in the img elements. Indenting your code can make it easier to read and debug.

    1 Like

    THANK YOU SOOOO MUCH!! I’m such a doughnut I did not realised that I misplaced the target attribute! I hope you have the best day ever :raising_hands:

    1 Like