Build a Travel Agency Page - Build a Travel Agency Page

Tell us what’s happening:

I’m stuck on #'s 26, 28, 31 and 32. I thought the answers were correct but apparently thety are not. Can you please help?

Your code so far

<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <meta name="description" content="Get to know Bahia de Banderas"/>
    <title>Nayarit Travel Agency</title>
    </head>
    <body>
      <h1>Nuevo Nayarit</h1>
        <p>Bahia De Banderas</p>
        <h2>Packages</h2>
        <p>Travel packages</p>
          <ul>
            <li><a href="https://www.expedia.com/Bahia-De-Banderas.d553248635023284946.Destination-Travel-Guides">Group Travels</a></li>
            <li><a href="https://www.tripadvisor.com/Attractions-g14958911-Activities-c42-t235-Bahia_de_Banderas_Municipality_Pacific_Coast.html">Private Tours</a></li>
          </ul>
          <h2>Top Itineraries</h2>
          <figure>
            <a href="https://unsplash.com/photos/an-aerial-view-of-a-village-on-the-edge-of-a-cliff-JzpZHTFtS7A" target="_blank"><img src="https://unsplash.com/photos/an-aerial-view-of-a-village-on-the-edge-of-a-cliff-JzpZHTFtS7A" alt="beach scenery">
            <figcaption>Beautiful Scenery in BDB</figcaption>
            </figure>
            <figure>
            <a href="https://unsplash.com/photos/a-beach-with-a-bunch-of-houses-on-top-of-it-Co8midqDjy4" target="_blank"><img src="https://unsplash.com/photos/a-beach-with-a-bunch-of-houses-on-top-of-it-Co8midqDjy4" alt="Cliff homes">
           <figcaption>Nice homes in BDB </figcaption>
            </figure>
            <figure>
            <a href="https://unsplash.com/photos/white-and-red-boat-on-sea-near-houses-during-daytime-GfrL3VVbPjM" target="_blank"><img src="https://unsplash.com/photos/white-and-red-boat-on-sea-near-houses-during-daytime-GfrL3VVbPjM" alt="boats">
            <figcaption>A lot to do </figcaption>
          </figure>      
        



           
    

Your browser information:

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

Challenge Information:

Build a Travel Agency Page - Build a Travel Agency Page

Hi @czrdgr8 and welcome to our community!

Your code is missing closing tags for body and html elements, though I’m guessing you’ve just not pasted your full code.

26.. Each figure element should contain a figcaption element as its second child.
28.. Each of the a elements that are children of your figure elements should contain an image.
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.
32.. Each a element should have a target attribute with the value of _blank . Don’t forget the links in the list items.

The reason these specified tests are failing is firstly because each figure element does not have a figcaption as its second child. You have anchor and img elements inside your figure element, followed by figcaption as third child. Note that your anchor elements are not closed off properly. If they were, with the img elements nested inside them, that would solve the problem.

The other tests specify that all of your anchor elements should have an href pointing to https://www.freecodecamp.org/learn. You have different urls in your href attributes. You also do not have target attributes in all of your anchor elements.

For the life of me I can’t figure it out. I’ve tried different things but I can’t figure out where my anchor elements need to be closed off and how to make the figcaption the second element. Can you show me so I can note it please?

Please post your updated code to show what you have tried to fix based on the suggestions already offered.

Your img elements should be nested inside your a elements. You are also missing a closing angle bracket (>) from each of your opening a tags.

Also, as I said previously, all of the a element href attributes should have the url specified in the challenge description.

I made the corrections, or so I thought but I’m still not getting those items corrected #'s 26, 28, 31 and 32.

When you enter a code block into a forum post, please precede it with a separate line of three backticks and follow it with a separate line of three backticks to make it easier to read.

You can also use the “preformatted text” tool in the editor (</>) to add backticks around text.

See this post to find the backtick on your keyboard.
Note: Backticks (`) are not single quotes (').

The img element is a void element, so it doesn’t require a closing </img> tag, but it does require a closing >. That’s all I can see until you post your full code as suggested.

Also, until you are more comfortable with HTML, consider using a validator to check for errors like this. Just click on the “Validate by Direct Input” tab, paste your code into the text area, and click the “Check” button. Fix your errors, then check/fix again until there are no more errors.