"Build a Product Landing Page" - №5 "When I click a .nav-link button in the nav element, I am taken to the corresponding section of the landing page."

Good day!

I am doing a page programming task, and for a long time I cannot solve the "№5 “When I click a .nav-link button in the nav element, I am taken to the corresponding section of the landing page.” error. Please tell me what could be the problem?

link project: https://codepen.io/vjusmamh-the-lessful/pen/abwzVeG

Your browser information:

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

Challenge: Build a Product Landing Page

Link to the challenge:

Hey! i just checked out your webpage and there are a lot of syntactic errors in your html.
Which basically means that your code is not following the right syntax (grammar) rules of the language.

You should probably first solve those first.

You can find out what your errors are if you click on the down arrow on the html pane and click on analyze html.

Screenshot from 2021-08-25 20-32-03

And as for the problem with the task, you aren’t using a section with an id attribute of “features”.

Hope this helped! :smiley:

1 Like

Hi @NikJeorg !

Welcome to the forum!

You have an issue with all of you nav links going to their respective sections on the page.

I think you should review this lesson on how to Link to Internal Sections of a Page with Anchor Elements

But also I agree with @staranbeer that you html errors are making it difficult to pass the tests.

Focus on reviewing that lesson and cleaning up those errors.

When I cleaned up your page then it passed for me.

Just take your time going through those errors and if you need help then let us know.

Thanks for the advice, I tried to change the code, but the problem is still the same: (Maybe I’m tired, but I still don’t understand how to solve the problem.

I did as you said. Moving from navigation box to text works. But “Select Test Suite” from “FreeCodeCamp” shows all the same error: " 5. When I click a .nav-link button in the nav element, I am taken to the corresponding section of the landing page.’ The .nav-link with href="#start" is not linked to a corresponding element on the page : expected null to not equal null AssertionError: The .nav-link with href="#start" is not linked to a corresponding element on the page : expected null to not equal null" I don’t even know what the problem might be. I’ve already tried everything

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