Hi, I’m asking for help on the Technical Documentation Page project. On the tests, this error keeps coming up for me:
Each .nav-link
should have text that corresponds to the header
text of its related section
(e.g. if you have a “Hello world” section/header, your #navbar
should have a .nav-link
which has the text “Hello world”).
I’d be so grateful if someone could help me. This is my code so far:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>THIS IS A PAGE</title>
<link rel="stylesheet" href="styles.css">
</head>
<body>
<nav id="navbar">
<header>Technical Documentation</header>
<ul>
<li><a class="nav-link" href="#Introduction">Introduction</a></li>
<li><a class="nav-link" href="#Beginnings">Beginnings</a></li>
<li><a class="nav-link" href="#Middle_Section">Middle Section</a></li>
<li><a class="nav-link" href="#Other_Remarks">Other Remarks</a></li>
<li><a class="nav-link" href="#Conclusions">Conclusions</a></li>
</ul>
</nav>
<main id="main-doc">
<section class="main-section" id="Introduction">
<header>Introduction</header>
<p>I have something to say.</p>
<ul>
<li>There is this.</li>
<li>Then there is this.</li>
<li>And also, there is this.</li>
<li>Then we have another something.</li>
<li>And something else that I can think of.</li>
</ul>
</section>
<section class="main-section" id="Beginnings">
<header>Beginnings</header>
<p>There is also something to say in this section.</p>
</section>
<section class="main-section" id="Middle_Section">
<header>Middle Section</header>
<p>And i have more to say here.</p>
</section>
<section class="main-section" id="Other_Remarks">
<header>Other Remarks</header>
<p>This is what I have to say in this section about coding...</p>
<pre><code>
html {
width: 100%;
}
</code></pre>
<p>This also is some more CSS.</p>
<pre><code>
* {
margin: 0;
padding: 0;
}
</code></pre>
</section>
<section class="main-section" id="Conclusions">
<header>Conclusions</header>
<p>And finally, I also have lots to say here. You can write this in code:</p>
<pre><code>
p {
background-color: rgb(132, 215, 23);
color: rgb(97, 90, 255);
font-style: italic;
}
</code></pre>
<p>It is also possible to style whole classes at once.</p>
<pre><code>
.main-section {
font-family: sans-serif;
}
</code></pre>
<p>... or whole id groups.</p>
<pre><code>
#3 {
border: 2px;
border-style: solid;
}
</code></pre>
<p>Then, there is the possibility to style several items at once.</p>
<pre><code>
li, p {
color: Gold;
}
</code></pre>
<p>If only targeting a specific sort of item from a group, this can be specified. Instead of this...</p>
<pre><code>
ul {
list-style-type: none;
margin: 0;
padding: 0;
}
</code></pre>
<p>... you do this:</p>
<pre><code>
nav li {
display: inline;
}
</code></pre>
<p>This is not all. More later.</p>
</section>
</main>
</body>
</html>
Wishing a great day to everyone.