Technical Documentation Page - Build a Technical Documentation Page

Tell us what’s happening:
Failed: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">
<header>
 <meta charset="UTF-8">
 <link rel="stylesheet" href="styles.css">
 </header>
 <body>

<main id="main-doc">
  <section class="main-section" id="Introduction">
    <header id="intro">Introduction</header>
    <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>
    <code>Array, Date, and Math</code>
    <li>Client-side JavaScript</li>
    <li>Server-side JavaScript</li>
    </section>
  <section class="main-section" id="What_you_should_already_know">
    <header id="what">What you should already know</header>
    <p>This guide assumes you have the following basic background:</p>
    <p>Read more, learn more..</p>
    <code>HTML</code>
    <li>A general understanding</li>
    <li>Good working knowledge</li>
    <li>Some programming experience</li>
    </section>
  <section class="main-section" id="JavaScript_and_Java">
    <header id="java">JavaScript and Java</header>
    <p>JavaScript and Java are similar in some ways but fundamentally different in some others.</p>
    <p>In contrast to Java's compile-time system of classes built by declarations.</p>
    <li>JavaScript is a very free-form language compared to Java.</li>
    <code>JavaScript</code>
    </section>
  <section class="main-section" id="hello_world">
    <header id="hello">Hello world</header>
    <p>To get started with writing JavaScript, open the Scratchpad and write your first "Hello world" JavaScript code:</p>
    <code>function greetMe(yourName) { alert("Hello " + yourName); }</code>
    <code>greetMe("World");</code>
    <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="variables">
    <header id="vari">Variables</header>
    <p>You use variables as symbolic names for values in your application.</p>
    <p>A JavaScript identifier must start with a letter, underscore (_), or dollar sign ($);</p>
    <code>var x = 42.</code>
    <li>You can use ISO 8859-1 or Unicode letters such as å and ü in identifiers.</li>
    </section>
  <nav id="navbar">
    <header id="js">JS Documentation</header>
  <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
  </a>
  </li>
  <li>
  <a class="nav-link"
  href="JavaScript_and_Java">JavaScript and Java
  </a>
  </li>
  <li>
  <a class="nav-link"
  href="hello_world">Hello world
  </a>
  </li>
  <li>
  <a class="nav-link"
  href="variables">Variables
  </a>
  </li>

</html>
</body>
/* file: styles.css */
#what{
  font-size:20px;
  font-style:bold;
  margin-top:12px; 
}

#java{
  font-size:20px;
  font-style:bold;
  margin-top:12px;
}

#hello{
  font-size:20px;
  font-style:bold;
  margin-top:12px;
}

#vari{
  font-size:20px;
  font-style:bold;
  margin-top:12px;
}

#js{
  font-size:20px;
  font-style:bold;
  margin-top:12px;
  margin-bottom:12px;
}

#intro{
  font-size:20px;
  font-style:bold;
}

@media only screen and (max-width: 768px) {
  /* For mobile phones: */
  [class*="col-"] {
    width: 100%;
  }
}

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36

Challenge: Technical Documentation Page - Build a Technical Documentation Page

Link to the challenge:

Your links should have # in front to denote that they are targeting ids. Also your links need to match the ids. So the link “#intro” will take you to the section with the id of “intro”

2 Likes

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