Product Landing Page Challenge--links

Tell us what’s happening:

  • Each .nav-link element should have an href attribute.

  • Each .nav-link element should link to a corresponding element on the landing page (has an href with a value of another element’s id. e.g. #footer).

I don’t understand why these two are errors. I have href attributes and they all link to elements on the page…#link1, #link2, and #link3 all link to div elements with those ids. In the preview all the links work and go to those elements. Yet it won’t validate.

Your code so far


The challenge seed code and/or your solution exceeded the maximum length we can port over from the challenge.

You will need to take an additional step here so the code you wrote presents in an easy to read format.

Please copy/paste all the editor code showing in the challenge from where you just linked.

<li class="nav-link"><a class="outline" href="#link1">Classes</a></li>
<li class="nav-link"><a class="outline" href="#link2">Teaching</a></li>
<li class="nav-link"><a class="outline" href="#link3">Booking</a></li>

Your browser information:

User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/103.0.5060.53 Safari/537.36

Challenge: Build a Product Landing Page

Link to the challenge:

I could be wrong here, but the way I am reading that would mean the a tags should have the nav-link class… Not the li tags

Nope, not wrong! It works, thank you!

1 Like

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