Need Help With Product Landing Page Story #5

Hello everyone. I know there are several topics for this issue and I have tried to read them all, but still not sure where my problem is. Possibly it’s an oversight and perhaps someone can take a look at my code.

This is my codepen: https://codepen.io/citygray_/pen/gOrVmJx

The links on the top right take you to the respective sections on the page, but still I can’t pass the test. What am I missing?

I’m aware my site is very basic but I have never been comfortable with design and I’m not really a creative person :innocent: Still I’m open to suggestions and please feel free to criticize my bad code practices.

Thank you very much in advance.

  • You should have class="nav-link" on the anchor tag itself… You’ve defined the nav-link class on list item
  • Check your submit button, you will know why, your submit button isn’t having id="submit"

You can view detailed explanation of why tests failed , by clicking on number of tests passing, It’ll give you idea of what’s wrong with the code
Let me know if some problem arises

1 Like

Thank you so much! It has fixed the problem. I knew it would be something simple…

But still, I re-read the instructions several times and it never occured to me “nav-link” class should be on the anchor tag.: " When I click a .nav-link button in the nav element, I am taken to the corresponding section of the landing page."

Anyway, I’m glad this is finally fixed, my second project is now done :sweat_smile:

Wait… Better you should test your html in html Validator, I found some mistakes

  • You’ve li tags without ul
  • Unclosed tags

You can ignore warning with head, title, html and doctype tag in the above validator, but try to fix other problems with unclosed and stray tags, these mistakes can lead to some unexpected behavior in page

Oh thanks for pointing that out. I have just tested my code there, but I don’t understand why it says my form tag is open. I have closed it a few lines below on the 43. row
https://codepen.io/citygray_/pen/gOrVmJx

Same goes with my nav tag. I have also closed it but it says my nav tag is unclosed, and also there is a stray nav tag.

Any idea why that might be? Indentation?

Edit: I got it, I closed nav after closing the header, which is pretty silly. Same goes with my form tag. Thanks a lot for pointing these out.

I think you’ve already fixed the conflicts…
Now, your html passes the Validator :+1: :+1: