Build a Travel Agency Page - Build a Travel Agency Page

Tell us what’s happening:

I don’t know what I need to add/change.
It is saying that I am failing Test 31 and 32 so I think that it has something to do with the listing? I don’t really know.
Any help will be appreciated!

Your code so far

<!DOCTYPE html>
<html lang="en">
  <head>
    <meta name="description" content="This is the description of the page"> 
    </meta>
    <meta charset="UTF-8">
    </meta>
    <title>Travel Agency Page</title>
    </head>
    <body>
      <h1>The World</h1>
      <p>The world contains lots of different experiences for everybody. This includes long hikes, relaxing beaches and friendly restaurants.</p>
      <h2>Packages</h2>
      <p>There are many packages including group tours, work experience and family friendly fun!</p>
      <ul>
        <li><a href="#">Group Travels</a></li>
        <li><a href="#">Private Tours</a></li>
        </ul>
        <h2>Top Itineraries</h2>
        <ol>
          <li>
        <figure><a><img src="https://cdn.freecodecamp.org/curriculum/labs/colosseo.jpg"alt="A colosseum"href="https://www.freecodecamp.org/learn"target="_blank"></img></a> <figcaption><p>Rome</p></figcaption>
          </figure>
          </li>
          <li>
          <figure><a><img src="https://cdn.freecodecamp.org/curriculum/labs/sea.jpg" alt="A picture of clear blue sea with a small boat in the middle" href="https://www.freecodecamp.org/learn"target="_blank"></img></a> <figcaption><p>Bahamas</p></figcaption>
          </figure>
          </li>
          <li>
          <figure><a><img src="https://cdn.freecodecamp.org/curriculum/labs/alps.jpg" alt="A picture of snowy peaks with grass in the foreground" href="https://www.freecodecamp.org/learn"target="_blank"></img></a> <figcaption><p>The Alps</p></figcaption>
          </figure>
          </li>
          </ol>
      </body>
  </html>

Your browser information:

User Agent is: Mozilla/5.0 (X11; CrOS x86_64 14541.0.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36

Challenge Information:

Build a Travel Agency Page - Build a Travel Agency Page

Welcome to the forum @Chloolly!

The failed tests are telling you what the issue is. What do those tests say? Where are the href and target attributes? Where should they be?

Please review what void HTML elements are and how they differ from most HTML elements:

Understanding HTML Attributes - What Role Does HTML Play on the Web? | Learn | freeCodeCamp.org

You may want to check your code using this HTML Validator until you are more comfortable with HTML.

Happy coding!

This is what the tests are saying:

  • 31. 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.

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

I placed the code into HTML Validator and I’ve changed the code slightly but it’s coming up with Error: Attribute href not allowed on element img at this point.

Does this mean the entire code is wrong? This has come up for all three elements.

It means the img element does not accept an href attribute. Read the test messages again. Into what element does it say the href attribute should go?

BTW, if you check the “source” checkbox in the HTML validator and click the “Check” button again, you can see where the errors are in your code by scrolling down to the bottom of the screen.

You can use the validator to check/fix your code until it says your code is okay.

You may also want to pay close attention to the identical last sentence in the failed test messages.

I did it! Well, with the help of the checker I had the href and the img the wrong way around.