Am having a problem with linking an href="" to a corresponding element on the page

hello i’ve been working on the #Product Landing Page test and am having a problem with user story number 5.

These are the error messages i’m receiving when i click test; The .nav-link with href="" is not linked to a corresponding element on the page : expected null to not equal null.
Can someone help me?

My code pen project:

Hi,

  1. The most important thing is that a div cannot have href attributes, Only anchor tags have href attributes. So please remove those.

  2. The second thing is that here your anchors should have href attributes linking to certain sections of your page.
    So for that, please make different sections on your page (same page) for Home, About and Contact Us with section or div tag and give those an id. For example, if the contact section has the id “contact”, then in the anchor tag, please set href as follows: <a href="#contact">Contact Us</a>
    This will help the user jump to the contact section of your page when clicking on the Contact Us hyperlink.

So it would look like this:

<div class =“nav-link” >
<a href="#contact">Contact Us</a>
</div>

Same for the other two anchors as well.

And down on the page, you should have different sections which hold the info for Home, About and Contact

<section id=“home”>
<!— Contents of home section will go here →
</section>
<section id=“about”>
<!— Contents of about section will go here →
</section>
<section id=“contact”>
<!— Contents of contact section will go here →
</section>

Thanks alot though im told i should have included the nav-link class within my a elemeent

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.