Certification Project: Product Landing Page

Hi guys, I’m having trouble completing my certification project. The final error in the code reads: “Failed: Each .nav-link element should have an href attribute.”

I have change the format in anyway I could, but I still could not find the problem, here are both my codes:

1 Like

Welcome to the community @karldreta !

Try removing the closing anchor > tags after nav-link > to see if that will help.

1 Like

Hi @karldreta !
If you are still having difficulties, please post the complete html index and the complete css code using the </> preformatted at the top of this text box?

This allows for a direct, timely, and accurate response from the community!

Keep up the good progress!

2 Likes

Hi!
The anchor element (<a></a>) creates a link and needs an href attribute to know where exactly to direct you when you click on it. So, you don’t need to add an href attribute to non-anchor elements (like your list items), since they themselves are not links.

Now, the step of this project specifically asks you to create elements with the class “nav-link” and add the href attribute to them. Since the anchor elements are the only ones that need an href attribute in your nav, try to add the “nav-link” class to your anchor elements instead of your list items.
Hope this helps!

2 Likes

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