Build a Travel Agency Page - Build a Travel Agency Page

Tell us what’s happening:

Hello,
In case it helps.
I’ve noticed in the HTML courses ‘Build a Recipe Page’ and ‘Travel Agency Page’, that the test passes, although I have errors in my code, such as:

  • not closing or wrongly the
  • element
  • forgetting space between attributes

Your code so far

<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="utf-8">
  <meta name="description" content="Travel agency page for nice travels">
  <title>Travel Agency Page</title>
  </head>
<body>
  <h1>Travels to Asia</h1>
  <p>Opportunities to travel in various countries in Asia</p>
  <h2>Packages</h2>
  <p>Packages to travel in various countries in Asia</p>
  <ul> 
    <li> <a href="https://www.freecodecamp.org/learn" target="_blank">Group Travels</a> 
    <li> <a href="https://www.freecodecamp.org/learn" target="_blank">Private Tours</a> </ilil>
    </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="abc">
      </a>
    <figcaption>The Eiffel Tower.</figcaption>
    </figure>
  <figure>
    <a href="https://www.freecodecamp.org/learn"target="_blank">
      <img src='https://cdn.freecodecamp.org/curriculum/labs/alps.jpg'alt="cde">
      </a>
    <figcaption>The Sky.</figcaption>
    </figure>
  <figure>
    <a href="https://www.freecodecamp.org/learn" target="_blank">
      <img src='https://cdn.freecodecamp.org/curriculum/labs/sea.jpg'alt="fgh">
      </a>
    <figcaption>A Boat.</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/138.0.0.0 Safari/537.36

Challenge Information:

Build a Travel Agency Page - Build a Travel Agency Page

https://www.freecodecamp.org/learn/full-stack-developer/lab-travel-agency-page/build-a-travel-agency-page

Can you please specifically point out lines in the code that are incorrect?

The test are not always necessarily checking for 100% valid code either, but that you fulfill the requirements of the lab.

Did your page appear broken in some way?

the browser is going to complete the missing parts as best as it can, sometimes that results in code that passes the tests, and sometimes it doesn’t

if you want to be sure that your html is correct you can use an html validator Ready to check - Nu Html Checker

1 Like

Just documenting here:

1. **Error**: Stray end tag `ilil`. From line 15, column 89; to line 15, column 95
`Tours</a> </ilil>↩    <`
2. **Error**: No space between attributes. At line 19, column 49
`camp.org/learn"target="_blank"`
3. **Error**: No space between attributes. At line 20, column 75
`s/colosseo.jpg'alt="abc">↩    `
4. **Error**: No space between attributes. At line 25, column 49
`camp.org/learn"target="_blank"`
5. **Error**: No space between attributes. At line 26, column 71
`/labs/alps.jpg'alt="cde">↩    `
6. **Error**: No space between attributes. At line 32, column 70
`m/labs/sea.jpg'alt="fgh">↩    `

The browser does translate it so the page renders correctly

 <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">

Does the test suite act on the code as rendered by the browser (not as written)? I guess so if this all passes the tests. Otherwise the li seems like it might fail?

it depends on the tests, if regex is used, then it tests what’s written, if something like querySelector is used, it tests what’s rendered

1 Like