Technical Document Help

My Work
I don’t understand the error.

So you have a link to your code? That is just a link to the testing package.

Im not sure how to share the actual page so you can see.

Please don’t provide pictures. please provide a link to your code if you can. If it’s not an online IDE, can you put it in a repo?

This?

Perfect. That’s it. Thanx.

I see a couple of problems here. The test is telling you:

  1. Each element with the class of “main-section” should also have an id comprised of the innerText contained within it, with underscores in place of spaces. The id may include special characters if there are special characters in the respective innerText. (e.g. The that contains the header, “JavaScript & Java”, should have a corresponding id=“JavaScript_&_Java”).

So it is telling you that it is looking inside the header to find the text and wants an id for the section that is the snake case rendering of that text. But you have:

      <section id="second" class="main-section">
        <header id="second">
          <ul>
            <li>Second</li>
          </ul>
        <h2>Second</h2>
        </header>
        <p>Second section of Tech Document</p>
        <p>Typing Overview <code> a href="https://www.apple.com</code></p>
      </section>

So, the word “Second” appears twice, once in the li and once in the h2. So it is looking for a section id of “second_second”. If I get rid of those lis (or presumably change the id), that test passes.

The other problem I notice is that the section and header both have the same ids. But ids always have to be unique. Classes can be used more than once, but ids must always be unique.

Shame, I just don’t get it. Ive read it and re-read it. lol I just don’t get it, maybe its a sign.

This is what I have.

You are going to have to be more specific about what is confusing you. This can be confusing stuff. Right off the bat, I don’t understand why you have those li elements. Those are screwing things up,

I finally figured it out. I read that it needed those li, I was wrong. thank you man.

1 Like