My HTML code passes every test, except, “Each .nav-link element should have an href attribute.” I understand this is a Certification Project, however I’ve run out of leads to assist me in this issue. I’ve read-and-searched as much as I could before coming to the ask stage here. Any ideas to get me on the right path? Thank you in advance for your time! (Note: ignore my ugly CSS code, just trying to get the HTML in passing order first, unless of course, that’s where the problem lies lol)
User Agent is: Opera GX, core: 106.0.4998.42;
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36 OPR/106.0.0.0
Challenge Information:
Product Landing Page - Build a Product Landing Page
Thanks for the quick reply! I went back and added three section elements, and updated the href=“” attributes of my p class=“nav-link” elements to the newly corresponding section id’s. My code is still not passing the test, " Each .nav-link element should have an href attribute" with this update.
I moved the .nav-link from the p elements to the a elements and it worked! I think I attempted this solution before, but I must have not double-checked for errors close enough. Your post also clarified exactly what the test was requesting from me.
I also appreciate for the tip about p not accepting the href attributes – not removing them from p was most likely my issue when I tried this before.
Thank you again, I appreciate your time, see you around the forums.