Hello, I have almost completed the Challenge; I’m having trouble with the last question.
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 */
<link rel="stylesheet" href="styles.css">
<main id='main-doc'>
<section class='main-section' id="JavaScript_and_Java">
<header>JavaScript_and_Java</header>
<p></p>
<p></p>
<p></p>
<p></p>
<p></p>
<code></code>
<code></code>
<code></code>
<code></code>
<code></code>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<nav id='navbar'>
<header>Hello_world</header>
<a class='nav-link' href='JavaScript_and_Java'>JavaScript_and_Java</a>
</section>
<section class='main-section' id="JavaScript_and_Java">
<header>JavaScript_and_Java</header>
<p></p>
<p></p>
<p></p>
<p></p>
<p></p>
<code></code>
<code></code>
<code></code>
<code></code>
<code></code>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<nav id='navbar'>
<!-- <header>Hello_world</header> -->
<a class='nav-link' href='JavaScript_and_Java'>JavaScript_and_Java</a>
</nav>
</section>
<section class='main-section' id="JavaScript_and_Java">
<header>JavaScript_and_Java</header>
<p></p>
<p></p>
<p></p>
<p></p>
<p></p>
<code></code>
<code></code>
<code></code>
<code></code>
<code></code>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<nav id='navbar'>
<!-- <header>Hello_world</header> -->
<a class='nav-link' href='JavaScript_and_Java'>JavaScript_and_Java</a>
</section>
<section class='main-section' id="JavaScript_and_Java">
<header>JavaScript_and_Java</header>
<p></p>
<p></p>
<p></p>
<p></p>
<p></p>
<code></code>
<code></code>
<code></code>
<code></code>
<code></code>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<nav id='navbar'>
<!-- <header>Hello_world</header> -->
<a class='nav-link' href='JavaScript_and_Java'>JavaScript_and_Java</a>
</section>
<section class='main-section' id="JavaScript_and_Java">
<header>JavaScript_and_Java</header>
<p></p>
<p></p>
<p></p>
<p></p>
<p></p>
<code></code>
<code></code>
<code></code>
<code></code>
<code></code>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<nav id='navbar'>
<!-- <header>Hello_world</header> -->
<a class='nav-link' href='JavaScript_and_Java'>JavaScript_and_Java</a>
</section>
</div>
/* file: styles.css */
@media (max-width: 600px) {
body {
background-color: lightblue;
}
}
**Your browser information:**
User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/102.0.0.0 Safari/537.36
Challenge: Build a Technical Documentation Page
Link to the Challenge: