Help need can not pass the test

Help please

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.99 Safari/537.36

Challenge: Build a Product Landing Page

Link to the challenge:

Read the failing test closely. It is trying to tell you what the problem is:

  1. Each element with the class of “main-section” should also have an id comprised of the innerText contained within it, with underscores in place of spaces. The id may include special characters if there are special characters in the respective innerText. (e.g. The that contains the header, “JavaScript & Java”, should have a corresponding id=“JavaScript_&_Java”).

Some “main-section” elements are missing the following ids (don’t forget to replace spaces with underscores!) : NEW_TOWNHOUSE,HOUSE_AND_LAND_PACKAGE : expected 2 to equal 0 AssertionError: Some “main-section” elements are missing the following ids (don’t forget to replace spaces with underscores!) : NEW_TOWNHOUSE,HOUSE_AND_LAND_PACKAGE : expected 2 to equal 0

This is the relevant code:

    <li> <a class="nav-link" href="#NewTownhouse"> New Townhouse </a> </li>
    <li> <a class="nav-link" href="#Houseandlandpackage"> House and land package </a> </li>

and

    <section class="main-section" id= "NewTownhouse">
      <header>New Townhouse</header>

and

      <section class="main-section" id= "Houseandlandpackage">
        <header>House and land package</header>

Do you see how what you have done has not met the requirements?

If that is not clear enough of a hint, let us know.

thank for your reply, but i still not understnad the issue

OK, reread this line, closely. Pay special attention to the last 6 words.

Each element with the class of “main-section” should also have an id comprised of the innerText contained within it, with underscores in place of spaces…

It is repeated in the failing test messages twice as:

(don’t forget to replace spaces with underscores!)

Now look at the code:

    <section class="main-section" id= "NewTownhouse">
      <header>New Townhouse</header>

This is your inner text: “New Townhouse”
This is your id: “NewTownhouse”

Do you know see how you did not meet the requirements? Did not do what was asked?

When I fix that, all your tests pass for me.

1 Like