I am trying to validate the technical doc project but I always get the part about " Each .main-section should have an id that matches the text of its first child, having any spaces in the child’s text replaced with underscores (_ ) for the id’s" wrong…
Here is the code I have created so far:
<main id="main-doc">
<section id="Introduction" class="main-section">
<header>
<h1>Introduction</h1>
<p>You are going to learn how to code</p>
<p>Your need to be prepared for this</p>
</header>
</section>
<section id="Main_Principles" class="main-section">
<header>
<h1>Main Principles</h1>
<p>Start by clearing your mind</p>
<p>Take a deep breath in</p>
<p>And a deep breath out</p>
</header>
</section>
<section id="Instructions" class="main-section">
<header>
<h1>Instructions</h1>
<p>Know that you know nothing</p>
<p>You are going to be pushed to the limit</p>
<ul>
<li>Don't stress</li>
<li>Don't stress</li>
<li>Don't stress</li>
<li>Don't stress</li>
<li>Don't stress</li>
</ul>
</header>
</section>
<section id="Best_Practices" class="main-section">
<header>
<h1>Best Practices</h1>
<p>Never give up</p>
<p>Drink plenty of water</p>
<code>12x12</code>
<code>12x12</code>
<code>12x12</code>
<code>12x12</code>
<code>12x12</code>
</header>
</section>
<section id="FAQ" class="main-section">
<header>
<h1>FAQ</h1>
<p>Any questions guys?</p>
</header>
</section>
I’ve edited your post for readability. When you enter a code block into a forum post, please precede it with a separate line of three backticks and follow it with a separate line of three backticks to make it easier to read.
You can also use the “preformatted text” tool in the editor (</>) to add backticks around text.
It’s always important to read the full error. When I take your code and run it through the test, I get this error:
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”).
Some “main-section” elements are missing the following ids (don’t forget to replace spaces with underscores!) : INTRODUCTION__YOU_ARE_GOING_TO_LEARN_HOW_TO_CODE__YOUR_NEED_TO_BE_PREPARED_FOR_THIS,MAIN_PRINCIPLES__START_BY_CLEARING_YOUR_MIND__TAKE_A_DEEP_BREATH_IN__AND_A_DEEP_BREATH_OUT,INSTRUCTIONS__KNOW_THAT_YOU_KNOW_NOTHING__YOU_ARE_GOING_TO_BE_PUSHED_TO_THE_LIMIT__DON’T_STRESS_DON’T_STRESS_DON’T_STRESS_DON’T_STRESS_DON’T_STRESS,BEST_PRACTICES__NEVER_GIVE_UP__DRINK_PLENTY_OF_WATER__12X12_12X12_12X12_12X12_12X12,FAQ__ANY_QUESTIONS_GUYS? : expected 5 to equal 0
AssertionError: Some “main-section” elements are missing the following ids (don’t forget to replace spaces with underscores!) : INTRODUCTION__YOU_ARE_GOING_TO_LEARN_HOW_TO_CODE__YOUR_NEED_TO_BE_PREPARED_FOR_THIS,MAIN_PRINCIPLES__START_BY_CLEARING_YOUR_MIND__TAKE_A_DEEP_BREATH_IN__AND_A_DEEP_BREATH_OUT,INSTRUCTIONS__KNOW_THAT_YOU_KNOW_NOTHING__YOU_ARE_GOING_TO_BE_PUSHED_TO_THE_LIMIT__DON’T_STRESS_DON’T_STRESS_DON’T_STRESS_DON’T_STRESS_DON’T_STRESS,BEST_PRACTICES__NEVER_GIVE_UP__DRINK_PLENTY_OF_WATER__12X12_12X12_12X12_12X12_12X12,FAQ__ANY_QUESTIONS_GUYS? : expected 5 to equal 0
So, when it tries to figure out what your Introduction id should be INTRODUCTION__YOU_ARE_GOING_TO_LEARN_HOW_TO_CODE__YOUR_NEED_TO_BE_PREPARED_FOR_THIS,MAIN_PRINCIPLES__START_BY_CLEARING_YOUR_MIND__TAKE_A_DEEP_BREATH_IN__AND_A_DEEP_BREATH_OUT.
Read the instructions more closely:
an id comprised of the innerText contained within it
It is looking at the text that is in the header. Should all of that text be in the header?
How are you testing this? Maybe I’m misunderstanding something.
Oh, IC, the new curriculum is doing it differently now. I guess it doesn’t have that now. But what I’ve told you about why it’s not working still stands.