<code> elements

Tell us what’s happening:
Please i am finding it difficult to understand what is required of me when the instruction says " You should have at least five code elements that are descendants of .main-section elements".
urgent help needed.
thanks in advance.

Your code so far

WARNING

The challenge seed code and/or your solution exceeded the maximum length we can port over from the challenge.

You will need to take an additional step here so the code you wrote presents in an easy to read format.

Please copy/paste all the editor code showing in the challenge from where you just linked.

<!DOCTYPE html>
<html>
  <head>
    <meta charset="UTF-8"></meta>
  </head>
  <style>
    #navbar {
      border: solid;
    }
    @media (min-width: 400px) {
      body {
        display: flex;
        flex direction: column;
      }
    }
  </style>


  <body>
    
    <nav id="navbar"><header><a class="nav-link" href="#Introduction">Introduction</a><hr>
    <a class="nav-link" href="#What_You_Should_Already_Know">What You Should Already Know</a><hr>
    <a class="nav-link" href="#JavaScript_and_Java">JavaScript and Java</a><hr>
    <a class="nav-link" href="#Hello_World">Hello World</a><hr>
    <a class="nav-link" href="#Variables">Variables</a><hr></header></nav>
    
  <main id="main-doc">
    <section id="Introduction" class="main-section"><h2>Introduction</h2>
<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>

<P><ul id="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>Server-side JavaScript extends the core language by supplying objects relevant to running JavaScript on a server. For example, server-side extensions allow an application to communicate with a database, provide continuity of information from one invocation to another of the application, or perform file manipulations on a server.</li></ul></P></section>

    <section id ="What_You_Should_Already_Know" class="main-section"><h2>What You should Already Know</h2>
<P>This guide assumes you have the following basic background:</P>

<P><ul><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></ul></P></section>

    <section id="JavaScript_and_Java" class="main-section"><h2>JavaScript and Java</h2>
<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>

<P>In contrast to Java's compile-time system of classes built by declarations, JavaScript supports a runtime system based on a small number of data types representing numeric, Boolean, and string values. JavaScript has a prototype-based object model instead of the more common class-based object model. The prototype-based model provides dynamic inheritance; that is, what is inherited can vary for individual objects.</P> 
  <P>JavaScript also supports functions without any special declarative requirements. Functions can be properties of objects, executing as loosely typed methods.</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>

    <section id="Hello_World" class="main-section"><h2>Hello world</h2>
<P>To get started with writing JavaScript, open the Scratchpad and write your first "Hello world" JavaScript code:
function greetMe(yourName) { alert("Hello " + yourName); }
greetMe("World");
Select the code in the pad and hit Ctrl+R to watch it unfold in your browser!</P></section>

    <section id="Variables" class="main-section"><h2>Variables</h2>
<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). Because JavaScript is case sensitive, letters include the characters "A" through "Z" (uppercase) and the characters "a" through "z" (lowercase).</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>


    </main>
  </body>


</html>

Your browser information:

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

Challenge: Build a Technical Documentation Page

Link to the challenge:

change/replace all "h2"s to “header”
image

When you see header it is the literal name of the element. That is a <header> element.

An h2 is a heading element, not a header element. I know it’s a bit confusing.

1 Like

Reviewed

Thank you for your help.. I am very sorry, i made a mistake with my exact problem and i have rectified the error. Please do read my edited blog again and help. thanks.

HI @elitio33 !

Welcome to the forum!

I see you edited your post because you are looking for help about the code elements.
The test wants you to use 5 code elements in your technical document page.

These are code elements.

Also, it is not usually best to edit your posts to remove your original question because now the responses concerning the header don’t make much sense in this new context.

In the future if you have further questions about a challenge or project, it is best to ask them in this thread as a reply instead of editing your post.

Thanks for understanding :slight_smile:

Thank you very much for the update and correction. i will do better next time.
also, i have successfully completed the test.

1 Like