I can't understand what's wrong with user story 12 and 13

Hi guys i have some problems with
User Story #12: 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”).
User Story #13: When I click on a navbar element, the page should navigate to the corresponding section of the main-doc element (e.g. If I click on a nav-link element that contains the text “Hello world”, the page navigates to a section element that has that id and contains the corresponding header .

<section class="main-section" id="python">
                <header id="python">Python</header>
<section class="main-section" id="introduction">
                <header id="introduction" > introduction</header>
<section class="main-section" id="Programming">
                <header id="Programming" >Programming</header>
<section class="main-section" id="Match_Statements">
                <header id="Match_Statements">Match Statements</header>
<section class="main-section" id="Defining_Functions">
                <header id="Defining_Functions">Defining Functions</header>

and the code of the navbar is:

<nav id="navbar">
                    <li><a href="#python"  class="nav-link">Python</a></li>
                    <li><a href="#introduction" class="nav-link">introduction</a></li>
                    <li><a href="#Programming" class="nav-link">Programming</a></li>
                    <li><a href="#Match_Statements" class="nav-link">Match Statements</a></li>
                    <li><a href="#Defining_Functions" class="nav-link">Defining Functions</a></li>

i’m stuck with this problem :frowning:


  1. it’s better if you post a link to your pen rather than a small snippet of your code
  2. 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.

What you’ve given us is only a portion of the failing message

Edit: You do know that an id must be unique within the document, right?

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