Technical Document: <section> element with class of "main-section"

Pardon me if my formatting is off-base here. It’s been a while and I’m getting back in the groove here. Here’s my CodePen for the Technical Document project…

https://codepen.io/markdeafmcguire/pen/PoYvxJr

I’m currently investigating the final two issues…

  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”).

If I understand the rule correctly, the following code example is what I have for all five sections with their respective ids matching the text.

  <section class="main-section" id="Introduction"><!-- main section #1 -->
    <header><h2>Introduction</h2></header><!-- describe topic of section #1 -->

This should satisfy the #4 rule correctly. What am I missing here?

1 Like

You included a period after the innerText in your header. Paste this where it goes.

<section class="main-section" id="Using_Elements"><!-- main section #4 -->
    <header><h2>Using Elements</h2></header>
2 Likes

Ahh, great catch @Sky020. I didn’t realize a simple period could impact the results. Thank you so much. I really appreciate your help.