I’ve edited your post for readability. When you enter a code block into a forum post, please precede it with a separate line of three backticks and follow it with a separate line of three backticks to make it easier to read.
You can also use the “preformatted text” tool in the editor (</>) to add backticks around text.
Looking at your code, you don’t have any sections that go to Blogposts, Merchandise, etc.
When I go to the freeCodeCamp sample project, I can click on any of the nav links and it will take me to that corresponding section on the page.
Try it out for yourself and see what I mean.
That is what the error message is trying to tell you.
Right now, your nav links do not go anywhere.
I would suggest reviewing this lesson on how to link to internal sections on a page
But also, your video is not displaying because you are not using the correct code.
Here is how to get the correct code
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 questions on what you don’t understand.
The 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 fails?
On a side note, as previously mentioned, clicking the link should take the user to the appropriate section of the page.
This is what I have already read:
"5. 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"
I understand that this is saying that each of my links that are in the nav bar should link to the corresponding section on the page. Well, when I click each link, the links do in fact take me to the corresponding sections. They also each have an href attribute. So I do not understand why the test fails.
The remainder of the error message that contains various URLs, I do not understand that part of the error message.
That is not what it is saying.
It is saying that each .nav-link element should have an href attribute.
In your code each .nav-link element is an li and does not, and cannot, have an href attribute.
The a element has an href attribute.
The li element and the a element are different elements.
Does that help?
When the class is correctly placed the tests all pass and the user is still taken to the correct corresponding section.
@Roma Thank you very much for your help. Now that I realize my error, it’s hard to believe I didn’t understand it upon the first, second and third reading. It seems strangely simple now. Thank you for providing this guidance!