Build a Travel Agency Page - Build a Travel Agency Page

Tell us what’s happening:

My code won’t complete case test #30- Each figure element should contain a figcaption element as its second nested element. can someone see what I’m missing? I’ve tried: a ; spelling and syntax review; 2nd-nested figcaption element; reorg to place the figcaption in the literal 2nd place to be read; trial and error with the figure element and with the link element (this only confirmed sytax). What am I missing here?

Your code so far

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="description" content="travel">
<title>Travel Agency Page</title>
</head>
<body>
  <h1>destinations</h1>
  <p>Here are your choices</p>
  <h2>Packages</h2>
  <p>you know what it is</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">
    <img src="https://cdn.freecodecamp.org/curriculum/labs/colosseo.jpg" alt="some bs"></img>
    <figcaption>Godzilla's bed</figcaption></a>
  </figure>  
  <figure>
    <a href="https://www.freecodecamp.org/learn" target="_blank">     
    <img src="https://cdn.freecodecamp.org/curriculum/labs/alps.jpg" alt="some bs"></img>
    <figcaption>Frozen hell with no wifi</figcaption></a>
  </figure>
  <figure>
    <a href="https://www.freecodecamp.org/learn" target="_blank">
    <img src="https://cdn.freecodecamp.org/curriculum/labs/sea.jpg" alt="some bs"></img>
    <figcaption>Misery... just wet misery</figcaption></a>
  </figure>
</body>
</html>

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:157.0) Gecko/20100101 Firefox/157.0

Challenge Information:

Build a Travel Agency Page - Build a Travel Agency Page

GitHub Link: freeCodeCamp/curriculum/challenges/english/blocks/lab-travel-agency-page/669e2f60e83c011754f711f9.md at main · freeCodeCamp/freeCodeCamp · GitHub

Welcome to the forum @interstellarcodes,

You should have at least three figure elements, each containing an anchor element and a figcaption element that describes the figure’s image.
The three anchor elements should have an img element with an appropriate alt attribute and a src attribute set to a valid image as their content.

Based on the above instructions, what element should the anchor element contain? Does the img element require a closing tag? Should the anchor element contain afigcaption element?

Happy coding

Your guidance was spot on, ty. I had forgotten img is a void element. I passed the case when i moved the anchor to exclude the figcaption but i still hazy on why that works. does that mean it would’ve made it so the anchors content was image plus caption? and does that just not work, or is it just not what the system was lookiing for>

Yes.

If figcaption is inside the anchor element, how can it be the second nested element inside the figure element?