Each element with the class of "nav-link" should contain text that corresponds to the <header> text within each <section> (e.g. if you have a "Hello world" sec

Please help check up my code. The elements with the class of “nav-link” have texts that correspond to the header but the error still persists. Thanks in advance. Bellow is the link to the task:

<li><a class="nav-link" href="#Create"></a>Create</li>

As the error states you do not have the text under the nav-link class as you have in the header element. meaning the text under header element should match with the text under nav-link class.

  1. Each element with the class of “nav-link” should contain text that corresponds to the text within each (e.g. if you have a “Hello world” section/header, your navbar should have an element which contains the text “Hello world”).

@gbenganooah, 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 test says

Each element with the class of "nav-link" should contain text that corresponds to the <header> text within each <section> (e.g. if you have a "Hello world" section/header, your navbar should have an element which contains the text "Hello world").
Check that these headers have corresponding .nav-link elements and be mindful of case! : INTRODUCTION,CONNECT,COLLABORATE,CREATE,PUBLISH : expected 5 to equal 0
AssertionError: Check that these headers have corresponding .nav-link elements and be mindful of case! : 
INTRODUCTION,CONNECT,COLLABORATE,CREATE,PUBLISH : expected 5 to equal 0

Do you understand what the test is looking for and why it fails?

You have this same error/typo for your five classes
<li><a class="nav-link" href="#Introduction"></a>Introduction</li>

Only click if you cannot see what the typo is

there is not anchor text

Thank you for your response but I still seem not to get what is needed to be done having checked carefully through the lines.

For instance:
Nav-link

<li><a class="nav-link" href="#Introduction"></a>Introduction</li>

Corresponding header

<header>Introduction</header>

Same goes for others.

Could you please guide further on what is needed to be done? Thanks.

This is incorrect.
Where does the word “Introduction” need to be so that it is an anchor link and not a list item?

The way your code is now, clicking on any item in your nav does nothing.

Honestly, I don’t know.

Look at this line from your code again
<li><a class="nav-link" href="#Introduction"></a>Introduction</li>

Now take the <li> </li> tags off.
Do you have an anchor link that works properly?

In addition to being an item in a list that item should also be a link to a section in your code.

Thanks a bunch. I can’t believe it’s that disarrangement causing that issue.

This solved it:

 <li><a class="nav-link" href="#Introduction">Introduction</a></li>

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