PLP Project
Hi!!
I was hoping someone knew what is wrong with my code concerning the nav-link and form submission requirements for this project.
my internal links connect properly, so I’m at a loss and I’ve tried and to the required links in separate instances to troubleshoot but both don’t pass…
If anyone could skim over my code and let me know what’s going wrong or direct me to a forum I should be posting this on I’d <3 U!!
Hello @jaiden1
Welcome to the forum.
Please provide more information on what the issue is exactly as well as link to your project.
@jaiden1 when a test fails click the red button to see which test(s) are failing and text to help you correct the issue.
Be sure and read more than just the first line of the failing message. The ability to read and comprehend error messages is a skill you’ll need to acquire as a developer. Ask specific questions on what you don’t understand.
For example, the full text of the first failing message says
When I click a .nav-link button in the nav element, I am taken to the corresponding section of the landing page.'
Each .nav-link element should have an href attribute : expected false to equal true
AssertionError: Each .nav-link element should have an href attribute : expected false to equal true
Do you understand what the test is looking for and why it is failing?
Your code;
<nav id="nav-bar">
<h2 class="nav-link"><a href="#">Home</a></h2>
<h2 class="nav-link"><a href="#pricing">Pricing</a></h2>
<h2 class="nav-link"><a href="#contact">Contact</a></h2>
</nav>
does not meet the requirement.
On a side note you may want to do a search for something like html nav element
Hope that helps.
Thanks Roma.
I just passed that test with your advice and was hoping to pose a clarifying question to further cement an understanding of the error message.
The reason that code failed was because the class and href attributes weren’t in the same element? The anchor element?
That’s correct @jaiden1. It’s from user story #4 and it says;
I can see at least three clickable elements inside the nav
element, each with the class nav-link
.
And that’s what the test is checking.
The only clickable element would be the a
.
This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.