I need help with the navigation bar.
<!DOCTYPE html>
<html lang "en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="./styles.css">
</head>
<body>
<nav id="navbar">
<header class="nav-head">JS Documentation</header>
<ul class="navigation">
<li><a id="one" class="nav-link" href="#Introduction">Introduction</a></li>
<li><a class="nav-link" href="#Hello_World">Hello World</a></li>
<li><a class="nav-link" href="#Function_declarations">Function declarations</a></li>
<li><a class="nav-link" href="#Variables">Variables</a></li>
<li><a class="nav-link" href="#Constants">Constants</a></li>
</ul>
</nav>
<main id="main-doc">
<section class="main-section" id="Introduction">
<header><h1>Introduction</h1></header>
<code></code>
<p>JavaScript is a cross-platform, object-oriented scripting language. It is a small and lightweight language. Inside a host environment (for example, a web browser), JavaScript can be connected to the objects of its environment to provide programmatic control over them.</p>
<p>JavaScript contains a standard library of objects, such as Array, Date, and Math, and a core set of language elements such as operators, control structures, and statements. Core JavaScript can be extended for a variety of purposes by supplementing it with additional objects; for example:</p>
<ul class="list">
<li>Client-side JavaScript extends the core language by supplying objects to control a browser and its Document Object Model (DOM). For example, client-side extensions allow an application to place elements on an HTML form and respond to user events such as mouse clicks, form input, and page navigation.</li>
<li>continuity of information from one invocation to another of the application, or perform file manipulations on a server.</li>
</ul>
</section>
<section class="main-section" id="Hello_World">
<header><h1>Hello World<h1></header>
<p>To get started with writing JavaScript, open the Scratchpad and write your first "Hello world" JavaScript code:</p>
<p class="example"><code>function greetMe(yourName) { alert("Hello " + yourName); }
greetMe("World");</code></p>
<p>Select the code in the pad and hit Ctrl+R to watch it unfold in your browser!
</p>
</section>
<section class="main-section" id="Function_declarations">
<header><h1>Function declarations</h1></header>
<p>A function definition (also called a function declaration, or function statement) consists of the function keyword, followed by:</p>
<ul class="list">
<li>The name of the function.</li>
<li>A list of arguments to the function, enclosed in parentheses and separated by commas.</li>
<li>The JavaScript statements that define the function, enclosed in curly brackets, { }.</li>
</ul>
<p>For example, the following code defines a simple function named square:</p>
<p class="example"><code>function square(number) { return number * number; }</code></p>
<p>The function square takes one argument, called number. The function consists of one statement that says to return the argument of the function (that is, number) multiplied by itself. The return statement specifies the value returned by the function.</p>
<p class="example"><code>return number * number;</p>
<p>Primitive parameters (such as a number) are passed to functions by value; the value is passed to the function, but if the function changes the value of the parameter, this change is not reflected globally or in the calling function.</code></p>
</section>
<section class="main-section" id="Variables">
<header><h1>Variables</h1></header>
<p>You use variables as symbolic names for values in your application. The names of variables, called identifiers, conform to certain rules.</p>
<p class="example"><code>A JavaScript identifier must start with a letter, underscore (_), or dollar sign ($); subsequent characters can also be digits (0-9). Because JavaScript is case sensitive, letters include the characters "A" through "Z" (uppercase) and the characters "a" through "z" (lowercase).</code></p>
<p>You can use ISO 8859-1 or Unicode letters such as ĂĄ and ĂĽ in identifiers. You can also use the Unicode escape sequences as characters in identifiers. Some examples of legal names are Number_hits, temp99, and _name.</p>
</section>
<section class="main-section" id="Constants">
<header><h1>Constants</h1></header>
<p>You can create a read-only, named constant with the const keyword. The syntax of a constant identifier is the same as for a variable identifier: it must start with a letter, underscore or dollar sign and can contain alphabetic, numeric, or underscore characters.</p>
<p class="example"><code>const PI = 3.14;</code></p>
<p>A constant cannot change value through assignment or be re-declared while the script is running. It has to be initialized to a value.</p>
<p>The scope rules for constants are the same as those for let block scope variables. If the const keyword is omitted, the identifier is assumed to represent a variable.</p>
<p>You cannot declare a constant with the same name as a function or variable in the same scope. For example:</p>
<p class="example"><code>// THIS WILL CAUSE AN ERROR function f() {}; const f = 5; // THIS
WILL CAUSE AN ERROR ALSO function f() { const g = 5; var g;
//statements }</code></p>
<p>However, object attributes are not protected, so the following statement is executed without problems.</p>
<p class="example"><code>const MY_OBJECT = {"key": "value"}; MY_OBJECT.key =
"otherValue";</code></p>
</section>
</main>
</body>
</html>
*:not(h1){
font-size:19px;
}
.example{
background-color:#d3d3d3;
padding:20px;
margin-left:20px;
}
.list{
padding: 8px 75px;
}
#navbar{
position:fixed;
float:left;
width:250px;
height:100%;
margin-left:0px;
}
.nav-head{
font-size:20px;
font-style:bold;
}
.nav-link{
text-decoration:none;
list-style-type:none;
color:black;
border:1px solid black;
padding-left:0;
}
#main-doc{
margin-left:200px;
}
.navigation{
list-style-type:none;
Here’s how it should look like:
Here’s how mine looks like:
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.0.0 Safari/537.36
Challenge Information:
Technical Documentation Page - Build a Technical Documentation Page