Build a Technical Documentation Page

<main id="main-doc">
<section class="main-section" id="intro">
<header id="intro">Introduction</header>
<section class="main-section" id="already_know">
<header id="already_know">What you should already know</header>
<section class="main-section" id="jsj">
<header id="jsj">JavaScript and Java</header>
<section class="main-section" id="hello">
<header id="hello">Hello world</header>
<section class="main-section" id="var">
<header id="var">Variables</header>
<section class="main-section" id="dec_var">
<header id="dec_var">Declaring variables</header>
<section class="main-section" id="var_scope">
<header id="var_scope">Variable scope</header>
<section class="main-section" id="glb_var">
<header id="glb_var">Global variables</header>
<section class="main-section" id="constant">
<header id="constant">Constants</header>
<section class="main-section" id="data">
<header id="data">Data types</header>
<section class="main-section" id="if_else">
<header id="if_else">if...else statement</header>
<section class="main-section" id="while">
<header id="while">while statement</header>
<section class="main-section" id="declaration">
<header id="declaration">Function declarations</header>
<section class="main-section" id="reference">
<header id="reference">Reference</header>

My problem is " Failed: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."

I’ve edited your code 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.

See this post to find the backtick on your keyboard.
Note: Backticks (`) are not single quotes (').

This id does not match the text of the first child (the header)

This id does not match the text of the first child (the header)

This id does not match the text of the first child (the header)

And so on.

so how do i fix that?

You make the text in the header and the value of the id identical?

Above, you have

which is not

and so on.

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