Technical Documentation Page - Build a Technical Documentation Page

Tell us what’s happening:

I am really struggling to see what is happening here and what I am doing Wrong.

I can’t seem to make these 2 work:

  1. You should have the same number of .nav-link and .main-section elements.
    2.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”).

Any help greatly appreciated.

Your code so far


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.

Replace these two sentences with your copied code.
<!DOCTYPE html>
<html lang="en">
  <meta charset=utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <link rel="stylesheet" href="./styles.css">

  <nav id="navbar">
  <header id="menu-header html">HTML Documentation</header>
  <a class="nav-link" href="#introduction">Introduction</a>
   <a class="nav-link" href="#anatomy_of_an_html_element">Anatomy of a HTML Element</a>
  <a class="nav-link" href="#attributes">Attributes</a>
  <a class="nav-link" href="#anatomy_of_an_html_document">Anatomy of a HTML Document</a>
  <a class="nav-link" href="#entity_references">Entity References</a>
  <a class="nav-link" href="#html_comments">HTML Comments</a>
 <main id="main-doc">

   <section class="main-section" id="introduction">
      <header class="main-header">Introduction</header>
      <p>HTML (HyperText Markup Language) is a markup language that tells web browsers how to structure the web pages you visit. It can be as complicated or as simple as the web developer wants it to be. HTML consists of a series of elements, which you use to enclose, wrap, or mark up different parts of content to make it appear or act in a certain way. The enclosing tags can make content into a hyperlink to connect to another page, italicize words, and so on. For example, consider the following line of text:</p>
      <p class="html-example">My cat is grumpy</p>
      <p>If we wanted the text to stand by itself, we could specify that it is a paragraph by enclosing it in a paragraph (&ltp&gt) element:</p>
       <p class="html-example"><code>&ltp&gtMy cat is grumpy&lt/p&gt</code></p>


    <section="main-section" id="anatomy_of_an_html_element">
    <header class="main-header">Anatomy of an HTML Element</header>
    <p>Let's further explore our paragraph element from the previous section:</p>
    <img src="" alt="grumpy-cat-html-element" id="grumpy-cat-html-element"></img>
    <p>The anatomy of our element is:</p>

  <li><span id="list-bold">The opening tag:</span> This consists of the name of the element (in this example, p for paragraph), wrapped in opening and closing angle brackets. This opening tag marks where the element begins or starts to take effect. In this example, it precedes the start of the paragraph text.</li>
<li><span id="list-bold">The content:</span> This is the content of the element. In this example, it is the paragraph text.</li>
<li><span id="list-bold">The closing tag:</span> This is the same as the opening tag, except that it includes a forward slash before the element name. This marks where the element ends. Failing to include a closing tag is a common beginner error that can produce peculiar results.</li></ul>
<p> The element is the opening tag, followed by content, followed by the closing tag.</p>

  <section class="main-section" id="attributes">
      <header class="main-header">Attributes</header>

      <p>Elements can also have attributes. Attributes look like this:</p>
       <img src="" alt="grumpy-cat-html-element" id="atrributes-html"></img>

       <p>Attributes contain extra information about the element that won't appear in the content. In this example, the class attribute is an identifying name used to target the element with style information.</p>

<p>An attribute should have:</p>

  <li>A space between it and the element name. (For an element with more than one attribute, the attributes should be separated by spaces too.)</li>
  <li>The attribute name, followed by an equal sign.</li>
  <li>An attribute value, wrapped with opening and closing quote marks.</li>

      <section class="main-section" id="anatomy_of_an_html_document">
       <header class="main-header">Anatomy of an HTML Document</header>
      <p>Individual HTML elements aren't very useful on their own. Next, let's examine how individual elements combine to form an entire HTML page:</p>
      <p class="html-example2">
          <code>&lt;!doctype html&gt;
                &lt;html lang="en-US"&gt;
                   &nbsp; &nbsp; &lt;head&gt;
                &nbsp; &nbsp; &nbsp; &nbsp; &lt;meta charset="utf-8" /&gt;
                &nbsp; &nbsp; &nbsp; &nbsp; &lt;title>My test page&lt;/title&gt;
                 &nbsp; &nbsp; &lt;/head&gt;
                 &nbsp; &nbsp; &lt;body&gt;
                 &nbsp; &nbsp; &nbsp; &nbsp;&lt;p>This is my page&lt;/p&gt;
                 &nbsp; &nbsp; &lt;/body&gt;
        <p>Here we have:</p>
            <li><code class="li-header">&lt;!DOCTYPE html&gt;</code>: The doctype is a historical artifact that needs to be included for everything else to work right.  is the shortest string of characters that counts as a valid doctype. That is all you need to know!</li>

            <li><code class="li-header">&lt;html&gt&lt;/html&gt</code>: This element wraps all the content on the page. It is sometimes known as the root element.</li>

            <li><code class="li-header">&lt;head&gt&lt;/head&gt</code>: This element acts as a container for everything you want to include on the HTML page, that isn't the content the page will show to viewers. This includes keywords and a page description that would appear in search results, CSS to style content, character set declarations, and more. You will learn more about this in the next article of the series.</li>

            <li><code class="li-header">&lt;meta charset="utf-8"&gt;</code>: This element represents metadata that cannot be represented by other HTML meta-related elements, like &lt;base&gt&lt, &lt;link&gt&lt, &lt;script&gt&lt, &lt;style&gt&lt or &lt;title&gt&lt. The charset attribute specifies the character encoding for your document as UTF-8, which includes most characters from the vast majority of human written languages. With this setting, the page can now handle any textual content it might contain. There is no reason not to set this, and it can help avoid some problems later.</li>

            <li><code class="li-header">&lt;title&gt&lt;/title&gt</code>: This sets the title of the page, which is the title that appears in the browser tab the page is loaded in. The page title is also used to describe the page when it is bookmarked.

            <li><code class="li-header">&lt;body&gt&lt;/body&gt</code>: This contains all the content that displays on the page, including text, images, videos, games, playable audio tracks, or whatever else.

      <section class="main-section" id="entity_references">
       <header class="main-header">Entity References</header>
      <p>In HTML, the characters <, >,",', and & are special characters. They are parts of the HTML syntax itself. So how do you include one of these special characters in your text? For example, if you want to use an ampersand or less-than sign, and not have it interpreted as code.</p>

<p>You do this with character references. These are special codes that represent characters, to be used in these exact circumstances. Each character reference starts with an ampersand (&), and ends with a semicolon (;).</p>

<P>The character reference equivalent could be easily remembered because the text it uses can be seen as less than for &lt;, quotation for &quot; and similarly for others. To find more about entity references, see List of XML and HTML character entity references (Wikipedia).</p>

      <section class="main-section" id="html_comments">
       <header class="main-header">HTML Comments</header>

      <p>HTML has a mechanism to write comments in the code. Browsers ignore comments, effectively making comments invisible to the user. The purpose of comments is to allow you to include notes in the code to explain your logic or coding. This is very useful if you return to a code base after being away for long enough that you don't completely remember it. Likewise, comments are invaluable as different people are making changes and updates.</p>

<p>To write an HTML comment, wrap it in the special markers <!-- and -->. For example:</p>


Your browser information:

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

Challenge Information:

Technical Documentation Page - Build a Technical Documentation Page

Welcome to our community!

You have two completely same nav-link elements:

Delete the first one, and correct the title of the second section in Anatomy of an HTML Element. Do the same for the header element in the corresponding ‘section’.

The rest of the mistakes find and correct by yourself:

1 Like

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