Product Landing page > .nav-link problem

Hello,

.nav-link(#5) works but I can’t pass ,I don’t know what is the problem . please check my coding and give me a feedback. Below is my my codepen link.

Hey! instead of enclosing each nav item in a div, you need to add the nav-link class directly to each anchor tag.

Boxabl

take a look at the error you’re getting, it is expecting the element with the class of nav-link to have a href attribute so basically just remove the div’s entirely or cut paste the class from the div’s to the anchor tags.

p.s. i also noticed that you were using a lot of divs which isn’t ideal if you want to develop websites for the modern web. With the release of HTML5, semantic tags were introduced, which basically allow you to choose tags for a specific case, the usage of nav tag to mark up a navigation bar is an example of that.

You should probably replace the divs you used for the different sections to the section tag and the div used for the footer to a footer tag and enclose the dominant sections of your webpage into a main tag.

Here’s an awesome article if you want to learn more about that.

Hope this helped! :slightly_smiling_face:

1 Like

Thanks for your help.

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