Stuck on nav-link section of: "Building a Landing Page."

Hello. I’m still getting error messages stating :

  • Failed:Each .nav-link element should have an href attribute.

  • Failed:Each .nav-link element should link to a corresponding element on the landing page (has an href with a value of another element’s id. e.g. #footer).

I’m unsure what I’m doing incorrectly. I’ll share my code below. Hopefully, someone can bring me to the light.

<header id="header">    
        <nav id="nav-bar">
          <ul>
            <li>
              <a  class="nav-link" href="#The-Canine-Programmer">The Canine Programmer
              </a>
            </li>
            <li>
              <a  class="nav-link" href="#Help-For-The-Dyslexic-Dog">Help For The Dyslexic Dog
              </a>
            </li>
            <li>
              <a  class="nav-link"  href="#Teaching-Older-Dogs-New-Tricks">Teaching Older Dogs New Tricks
              </a>
            </li>
          </ul> 
          </nav>  <section class="nav-link">
    <h1>How It Works</h1>
    <div>
      <h3 id="The-Canine-Programmer">The Canine Programmer</h3>
      <p>With a "paw-board" specifically designed to be used by your best friend, a dog can start their journey toward becoming a canine programmer.</p>
    </div>
    <div>
      <h3 id="Help-For-The-Dyslexic-Dog">Help For The Dyslexic Dog</h3>
      <p>Your dog struggling with reading comprehension due to Dyslexia? Not an issue! Our special training regiment takes all learning styles into account</p>
    </div>
    <div>
      <h3 id="Teaching-Older-Dogs-New-Tricks">Teaching Older Dogs New Tricks</h3>
      <p>Age is just a number! It doesn't matter if Fido is pushing fifty or beyond. Our program is designed with patience, love, and plenty of opportunities for positive reinforcement (with treats, of course)!</p>
    </div>
  </section>

there is no .nav-link in here, the tests are right

And where did you put your .nav-link elements?

Oops! Right. I forgot that I actually took them out as I was attempting to figure out why the test kept telling me my three elements didn’t have href attributes and didn’t have corresponding elements linked to on the page. Thanks for the help on my first issue. Any guidance on the other two challenges I’m facing? * Each .nav-link element should have an href attribute.

  • Failed:Each .nav-link element should link to a corresponding element on the landing page (has an href with a value of another element’s id. e.g. #footer).

Randell,
Thank you for your help, sir.

what aboyt this one? this one doesn’t have a href

Ilenia,
Thank you. I did remove that class=“nav-link” from the tag, however, I’m still unable to clear the final two tests. I really appreciate you taking the time to help. I’ll keep at it. I know the solution is right in front of me and I’ll smack myself in the head when I see it!

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