Technical Documentation Page - Build a Technical Documentation Page

Tell us what’s happening:
Describe your issue in detail here.
I hate to ask for help but I have been stuck on this for a few days and can’t pass the following tests:

  • The first child of each .main-section should be a header element.
  • Each .main-section should have an id that matches the text of its first child, having any spaces in the child’s text replaced with underscores (_ ) for the id’s.
  • 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”).
  • 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).

I can’t see any errors, hope someone else can spot an error.

Thanks in advance for the help

  **Your code so far**
/* file: index.html */
<nav id='navbar'>
  <header>JS Documentation</headrer>
  <ul>
    <li><a class='nav-link' href='#introduction'>introduction</a></li>
    <li><a class='nav-link' href='#test'>test</a></li>
    <li><a class='nav-link' href='#javascript_and_java'>javascript and java</a></li>
    <li><a class='nav-link'href='#hello_wold'>hello world</a></li>
    <li><a class='nav-link' href='#variables'>Variables</a></li>
  </ul>
</nav>
<link rel="stylesheet" href="styles.css">
<main id='main-doc'>
  <section id='introduction' class='main-section'>
                   <header>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>
  <ul>
  <li>A general understanding of the Internet and the World Wide Web (WWW).</li>
  <li> knowledge of HyperText Markup Language (HTML).</li>
  <li>Some programming experience. If you are new to programming, try one of the tutorials linked on the main page about JavaScript.</li></ul>
  <section id='test' class='main-section'></section>
      <header>test</header>
  <p>You can declare a variable in three ways:</p>
  <p>With the keyword var. For example,</p>
  <ul>
    <li>Boolean. true and false.</li>
    <li>Number. 42 or 3.14159.</li>
    <li>String. "Howdy"</li>
    </ul>
  <section id='javascript_and_java' class='main-section'></section>
      <header>javascript and java</header>
  <p>JavaScript and Java are similar in some ways but fundamentally different in some others. The JavaScript language resembles Java but does not have Java's static typing and strong type checking. JavaScript follows most Java expression syntax, naming conventions and basic control-flow constructs which was the reason why it was renamed from LiveScript to JavaScript.</p>
  <p>JavaScript is a very free-form language compared to Java. You do not have to declare all variables, classes, and methods. You do not have to be concerned with whether methods are public, private, or protected, and you do not have to implement interfaces. Variables, parameters, and function return types are not explicitly typed.</p>
  <section id='hello_word'class='main-section'></section>
      <header>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); }
greetMe("World");</code>
  <p>Select the code in the pad and hit Ctrl+R to watch it unfold in your browser!</p>
  <section id='variables' class='main-section'></section>
      <header>Variables</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>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>
  <code>var x = 42.</code>
  <code>x = 42.</code>
  <code>let y = 13.</code>
  <code>let y = 15.</code>
  </main>
  
</section>
/* file: styles.css */
#navbar{
width:45%
}

@media(max-width:785px){
width:100%

}

.main-section{
color:blue;

}

#test{
color:pink
}
  **Your browser information:**

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

Challenge: Technical Documentation Page - Build a Technical Documentation Page

Link to the challenge:

Just a typo, in there:

Thank you so much! I never noticed it

Just corrected it, the same 4 tests initially mentioned still fail :frowning:

hi there,
the "introduction " section is missing a closing-tag.
the other section closing tags are not at the end of the section. If you take this section closing-tags and put it before the opening tags, your sections would work properly.
( You can see this in your last section where are two closing tags , in the section above is none.

<section id='variables' class='main-section'></section>
1 Like

Thanks!!!
Recctifying this helped me pass the challenge