Please kindly help
I keep on getting the same error message:
Each .nav-link
should have an href
attribute that links to its corresponding .main-section
(e.g. If you click on a .nav-link
element that contains the text “Hello world”, the page navigates to a section
element with that id)
**Your code so far**
/* file: index.html */
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<title>JS Documentation</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="stylesheet" href="styles.css">
<nav id="navbar">
<header>JS Documentation</header>
<a class="nav-link" href="/Introduction/">Introduction</a>
<a class="nav-link" href="/Coding/">Coding</a>
<a class="nav-link" href="/JavaScript/">JavaScript</a>
<a class="nav-link" href="/Hello/">Hello</a>
<a class="nav-link" href="/Variables/">Variables</a>
</nav>
<main id="main-doc">
<section class="main-section" id="Introduction">
<header>Introduction</header>
<p></p>
<p></p>
<code></code>
<code></code>
<li>General Understanding</li>
<li>Good work</li>
<li>Perseverance</li>
</section>
<section class="main-section" id="Coding">
<header>Coding</header>
<p></p>
<p></p>
<code></code>
<li>html</li>
<li>css</li>
</section>
<section class="main-section" id="JavaScript">
<header>JavaScript</header>
<p></p>
<p></p>
<code></code>
</section>
<section class="main-section" id="Hello">
<header>Hello</header>
<p></p>
<p></p>
<code></code>
</section>
<section class="main-section" id="Variables">
<header>Variables</header>
<p></p>
<p></p>
<code></code>
</section>
</main>
</head>
/* file: styles.css */
navbar
{
text-align: left;
}
@media (max-width: 600px) {
body {
background-color: lightblue;
}
}
**Your browser information:**
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/103.0.5060.134 Safari/537.36 Edg/103.0.1264.71
Challenge: Technical Documentation Page - Build a Technical Documentation Page
Link to the challenge: