Technical Documentation Page - Build a Technical Documentation Page

Tell us what’s happening:
hello, I need help. I keep getting stuck in the last step and the third last step.

Your code so far

<!-- file: index.html -->
<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
	<link rel="stylesheet" href="./styles.css">
    <link rel="stylesheet" href="styles.css">
    </head>
    <body>
      <nav id="navbar">
  <p><header>JS Documentation</header></p>
  <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</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>
  </ul>
</nav>
      <main id="main-doc">
 <section class="main-section" id="Introduction">
   <header>Introduction</header>
   <p>JavaScript is a cross-platform, object-oriented scripting language.</p>
   <p> 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>Core JavaScript can be extended for a variety of purposes by supplementing it with additional objects; for example:</p>
   <ul style="list-style-type:disc;">
     <li>Client-side JavaScript extends the core language by supplying objects to control a browser and its Document Object Model (DOM).</li>
     <li>Server-side JavaScript extends the core language by supplying objects relevant to running JavaScript on a server.</li>
 </section>
 <section class="main-section" id="What_you_should_already_know">
   <header>What you should already know</header>
   <p>This guide assumes you have the following basic background:
     <ul style="list-style-type:disc;">
       <li>A general understanding of the Internet and the World Wide Web (WWW).</li>
       <li>Good working 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>
 </section>
 <section class="main-section" id="Javascript_and_Java">
   <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.</p>
   <p>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>
 </section>
 <section class="main-section" id="Hello_world">
   <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>   
 </section>
 <section class="main-section" id="Variables">
   <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>A JavaScript identifier must start with a letter, underscore (_), or dollar sign ($); subsequent characters can also be digits (0-9).</p>
  <p>You can declare a variable in three ways:</p>
  <p><code>var x = 42.</code></p>
  <p><code>x = 42.</code></p>
  <p><code>let y = 13.</code></p>
  <p>For example the following code will log 5, because the scope of x is the function (or global context) within which x is declared, not the block, which in this case is an if statement.</p>
  <code>if (true) { var x = 5; } console.log(x); // 5</code>
 </section>

 
/* file: styles.css */
@media (max-width: 600px) {
body {
background-color: lightblue;
}
} 
header{font-weight: bold;}
body{display: flex;
flex-direction: row;
line-height: 1.5;}

Your browser information:

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

Challenge: Technical Documentation Page - Build a Technical Documentation Page

Link to the challenge:

Welcome to our community!

  • href=“#JavaScript_and_Java” doesn’t lead to the corresponding section:
<section class="main-section" id="Javascript_and_Java">

The values for the ‘href’ and ‘id’ attributes are not the same.

  • <ul style="list-style-type:disc;"> this element is not closed
  • <main id="main-doc"> is not closed

Thank you. Am also having an issue with the media Querry.

Try to change the header of the media query:

@media only screen and (min-width: 768px) {

When testing, you may need to enlarge the viewport or zoom out to ensure the navbar doesn’t scroll with the page content.

Still not passing, how do I restart the project?

@media (max-width:720px){
p {
display: none;
}
}
I have changed to that but still not passing

If you reset the project, you will have to do it again from scratch.

I thought it might help but it didn’t.

As you can see, your project passes the test if you change the media query as I said in the previous post.

I have used it and still getting this error
Failed:Your Technical Documentation project should use at least one media query.

Post the entire html and css code again.

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