Hi everyone, I am little stuck on these two steps and I can’t figure out how to complete the task.
- Your
#navbar
should have exactly oneheader
element within it.
2.(if I move the header after the nav, I get the error cause “The first child of each.main-section
should be aheader
element.”)*
2. The header
element in the #navbar
should come before any link (a
) elements also in the #navbar
.
(No idea how to get around this)
Your code so far
<!-- file: index.html -->
<!DOCTYPE html>
<html lang="en">
<head>
<link rel="stylesheet" href="styles.css">
</head>
<title></title>
<body>
<main id="main-doc">
<h2>JS Documentation</h2>
<section class="main-section" id="Introduction">
<header>
<nav id="navbar">
<h4><a class="nav-link" href="#Introduction">Introduction</a>
</h4>
</nav>
</header>
<p></p>
<p></p>
<code></code>
<ul>
<li>bla bla bla</li>
</ul>
</section>
<section class="main-section" id="What_you_should_already_know">
<header>
<nav id="navbar">
<h4>
<a class="nav-link" href="#What_you_should_already_know">What you should already know</a>
</h4>
</nav>
</header>
<p></p>
<p></p>
<code></code>
<ul>
<li>ble ble ble</li>
</ul>
</section>
<section class="main-section" id="Javascript_and_Java">
<header>
<nav id="navbar">
<h4>
<a class="nav-link" href="#Javascript_and_Java">JavaScript and Java</a>
</h4>
</nav>
</header>
<p></p>
<p></p>
<code></code>
<ul>
<li> blo blo blo</li>
</ul>
</section>
<section class="main-section" id="Hello_World">
<header>
<nav id="navbar">
<h4>
<a class="nav-link" href="#Hello_World">Hello World</a>
</h4>
</nav>
</header>
<p></p>
<p></p>
<code></code>
<ul>
<li>bli bli bli</li>
</ul>
</section>
<section class="main-section" id="Variables">
<header>
<h4>
<nav id="navbar">
<a class="nav-link" href="#Variables">Variables</a>
</h4>
</nav>
</header>
<p></p>
<p></p>
<code></code>
<ul>
<li>blu blu blu</li>
</ul>
</section>
</main>
</body>
</html>
/* file: styles.css */
Your browser information:
User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/110.0.0.0 Safari/537.36
Challenge: Technical Documentation Page - Build a Technical Documentation Page
Link to the challenge: