My Documentation Page keeps failing the thest

Hi all!

I don’t really know why, but my documentation page keep failing the test. I tried to refactor the whole project based only on user cases, but it still getting 14/16. Any help is appreciated! Thanks a lot!

The nav-link class should be on the <a> element not the <li>

I would also suggest refactoring it to using valid HTML. Unfortunately, the example project code is using invalid HTML for the nav (An <a> element cannot be a child of the ul element).

Change it to this structure instead:

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

Thank you! It helped, but I’m still getting 15/16, I think I should review the code one more time :slight_smile:

You just have a little error in the code. You have closed the a element before the text inside it.

You have:

<li><a href="#Variable_scope" rel="internal" class="nav-link"></a>Variable scope</li>

Should be:

<li><a href="#Variable_scope" rel="internal" class="nav-link">Variable scope</a></li>
1 Like

Thanks a ton, @lasjorg. The code is approved :slight_smile: