Technical Documentation Page - Build a Technical Documentation Page

Hi, so I am currently working on the title documentation page project at the moment but I can’t seem to link my HTML to CSS since I tried changing the font on my page but nothing seems to be happening

Your code so far

<!-- file: index.html -->
<!DOCTYPE html>
<html lang="en">
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial scale=1.0">

  <head> 
<title>Technical Documetation Page</title>
<link rel="stylesheet" href="styles.css">
    </head>
    <body>
    <nav id="navbar">
<header>JS Documentation</header>
</nav>
<ul>
<li><a class="nav-link" href="#introduction"> Introduction</a></li>
<li><a class="nav-link" href="#what_you_should_already_know">What You Should Already Know</li></a>
<li><a class="nav-link" href="#javascript_and_java">JavaScript And Java</li></a>
<li><a class="nav-link" href="#hello_world">Hello World</li></a>
<li><a class="nav-link" href="#variables">Variables</li></a>
<li><a class="nav-link" href="#declaring_variables">Declaring Variables</li></a>
        </ul>
        </nav>
      <main id="main-doc">
        <section class="main-section" id="introduction"><header>
Introduction
</header>
<ul>
        <li></li>
        <li></li>
</ul>
        </section>
<section class="main-section" id="what_you_should_already_know"><header>
What you should already know
</header>
<ul>
        <li></li>
        <li></li>
        <li></li>
</ul>
        </section>
        <section class="main-section" id="javascript_and_java">
<header>
JavaScript and Java
</header>
<p></p>
<p></p>
<p></p>
        </section>
<section class="main-section" id="hello_world"><header>
Hello World
</header>
<p></p>
</section>
<section class="main-section" id="variables">
<header>
Variables
</header>
<p></p>
<p></p>
<p></p>
</section>
    <section class="main-section" id="declaring_variables">
<header>
Declaring Variables
</header>
<p></p>
<p></p>
<p></p>
</section>
      </main>
      </body>
  </html>
/* file: styles.css */
.body{font-style:sans-serif;}

Your browser information:

User Agent is: Mozilla/5.0 (X11; CrOS x86_64 14541.0.0) 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:

link is fine,

but selector in CSS is actually class selector.

I think you don’t have any element on the page with class ='body' so styles are not applying

okay so do I have to add class=“body” to every anchor element I have next to “nav-link”?

I would rather change the selector itself, so it will be for body element, not for body class

I am not sure which selector I am supposed to replace it with instead, I have tried #body and just body yet they don’t work

just body should work

there is one more issue.

Check the CSS property you are using. Are you sure you want to use font-style here?

got it its been solved, thanks!

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