Technical Documentation Page - Build a Technical Documentation Page

Tell us what’s happening:

You should have the same number of .nav-link and .main-section elements.
please this part of my code is not checking and I need help

Your code so far

<!-- DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link rel="stylesheet" href="styles.css">
    </head>
    <body>
      <main id="main-doc">
        <section class="main-section" id="introduction">
          <header>
            <h1>Introduction</h1>
          </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.</p>
          <p>For example, consider the following line of text::</p>
          <pre><code>My cat is very grumpy</code></pre>
          <p>If we wanted the text to stand by itself, we could specify that it is a paragraph by enclosing it in a paragraph (&lt;p&gt;) element:</p>
          <pre><code>(&lt;p&gt;)My cat is very grumpy(&lt;p&gt;)</code></pre>
          </section>
          <section class="main-section" id="anatomy_of_an_html_element">
            <header>
              <h1>Anatomy of an HTML element</h1>
              </header>
              <p>Let's further explore our paragraph element from the previous section:</p>
              <img class="moderate" src="https://developer.mozilla.org/en-US/docs/Learn/HTML/Introduction_to_HTML/Getting_started/grumpy-cat-small.png">
              <p>The anatomy of our element is:</p>
              <ul>
                <li><strong>The opening tag:</strong> 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><strong>The content:</strong> This is the content of the element. In this example, it is the paragraph text.</li>
                <li><strong>The closing tag:</strong> 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>
            <section class="main-section" id="attribute">
              <header>
                <h1>Attribute</h1>
                </header>
                <p>Elements can also have attributes. Attributes look like this:</p>
                <img class="moderate" src="https://developer.mozilla.org/en-US/docs/Learn/HTML/Introduction_to_HTML/Getting_started/grumpy-cat-attribute-small.png">
                <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>
                <ul>
                  <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>
                  </ul>
              </section>
              <section class="main-section" id="anatomy_of_an_html_document">
                <header>
                  <h1>Anatomy of an HTML document</h1>
                  </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>
                  <pre><code >&lt;!DOCTYPE html&gt;
&lt;html lang="en-US"&gt;
  &lt;head&gt;
    &lt;meta charset="utf-8" /&gt;
    &lt;title&gt;My test page&lt;/title&gt;
  &lt;/head&gt;
  &lt;body&gt;
    &lt;p&gt;This is my page&lt;/p&gt;
  &lt;/body&gt;
&lt;/html&gt;</code></pre>
<p>Here we have:</p>
<ul>
  <li>&lt;!DOCTYPE html&gt;: The &lt;!DOCTYPE html&gt; is the shortest string of characters that counts as a valid doctype.</li> 
  <li>&lt;html&gt;&lt;/html&gt;:The &lt;html&gt; element. This element wraps all the content on the page. It is sometimes known as the root element.</li>
  <li>&lt;head&gt;&lt;/head&gt;:The &lt;head&gt; element. 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.
    <p>for example:</p>
    <pre><code>&lt;head&gt;
      &lt;meta charset="UTF-8"&gt;
      &lt;title&gt;&lt;/title&gt;
      &lt;link rel="" href="" /&gt;
      &lt;/head&gt;</pre></code>
  </li>
  <li>&lt;meta charset="UTF-8"&gt;:The &lt;meta&gt; element. This element represents metadata that cannot be represented by other HTML meta-related elements, like &lt;base&gt;, &lt;link&gt;, &lt;script&gt;, &lt;style&gt; or &lt;title&gt;. 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>&lt;title&gt;&lt;/title&gt;:The &lt;title&gt; element. 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>
  <li>&lt;body&gt;&lt;/body&gt;:The &lt;body&gt; element. This contains all the content that displays on the page, including text, images, videos, games, playable audio tracks, or whatever else.</li>
  </ul>
                </section>
                <section class="main=section" id="entity_reference_including_special_characters_in_html">
                  <header>
                    <h1>Entity references: Including special characters in HTML</h1>
                    </header>
                    <p>In html, the characters &lt;, &gt;, &quot;, &apos;, and &amp; 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 (&amp;), and ends with a semicolon (;).</p>
                    <table>
                      <tr>
                        <th>Literal Character</th>
    <th>Character Reference Equivalent</th>
  </tr>
  <tr>
    <td>&lt;</td>
    <td>&amp;lt;</td>
  </tr>
  <tr>
    <td>&gt;</td>
    <td>&amp;gt;</td>
  </tr>
  <tr>
    <td>&quot;</td>
    <td>&amp;quot;</td>
  </tr>
  <tr>
    <td>&apos;</td>
    <td>&amp;apos;</td>
  </tr>
  <tr>
    <td>&amp;</td>
    <td>&amp;amp;</td>
  </tr>
</table>
<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.</p>
                  </section>
                  <section class="main-section" id="html_comments">
                    <header>
                      <h1>HTML Comments</h1>
                      </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 &lt;!-- and --&gt;. For example:</p>
                      <pre><code>&lt;!-- &lt;p&gt;I am!&lt;/p&gt; --&gt;</code></pre>
                    </section>
                    <section class="main-section" id="reference">
                      <header>
                        <h1>Reference</h1>
                        </header>
                        <ul>
                          <li>All the documentation in this page is taken from <a href="https://developer.mozilla.org/en-US/docs/Learn/HTML/Introduction_to_HTML/Getting_started#what_is_html">MDN 
                          </ul>
                      </section>
                      <nav id="navbar">
                        <header>HTML Documentation</header>
                        <ul>
                          <li><a class="nav-link" href="#introduction">Introduction</a></li>
                          <li><a class="nav-link" href="#anatomy_of_an_html_element">Anatomy of an HTML element</a></li>
                          <li><a class="nav-link" href="#attribute">Attribute</a></li>
                          <li><a class="nav-link" href="#anatomy_of_an_html_document">Anatomy of an HTML document</a></li>
                          <li><a class="nav-link" href="#entity_reference_including_special_characters_in_html">Entity references:Including special characters in HTML</a></li>
                          <li><a class="nav-link" href="#html_comments">HTML Comments</a></li>
                          <li><a class="nav-link" href="#reference">Reference</a></li>
                          </ul>
                        </nav>
file: index.html -->

/* file: styles.css */

Your browser information:

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

Challenge Information:

Technical Documentation Page - Build a Technical Documentation Page

hi and welcome to the forum.

For your issue, I counted the .nav-links you have and they seem to be 7 while the .main-section elements are 6
As the error says that these should be the same, you should start by identifying these elements and matching them exactly to each other.

I think fixing the typo here would probably help with the error (my editor only detected 6 ‘main-section’ elements because of this)

can’t seem to get the typo

if you look closely at how you typed out main-section in the class attribute, you will notice that it was typed as main=section instead (equal sign was used)

thank you very much much appreciated

1 Like

remove the two dashes from here, this is wrong written like this

have done that. thanks

lastly this part of my code isn’t checking as well

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.

Please post your latest code

<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link rel="stylesheet" href="styles.css">
    <title>HTML DOCUMENTATION</title>
    </head>
    <body>
      <main id="main-doc">
        <section class="main-section" id="introduction">
          <header>
            <h1>Introduction</h1>
          </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.</p>
          <p>For example, consider the following line of text::</p>
          <pre><code>My cat is very grumpy</code></pre>
          <p>If we wanted the text to stand by itself, we could specify that it is a paragraph by enclosing it in a paragraph (&lt;p&gt;) element:</p>
          <pre><code>(&lt;p&gt;)My cat is very grumpy(&lt;p&gt;)</code></pre>
          </section>
          <section class="main-section" id="anatomy_of_an_html_element">
            <header>
              <h1>Anatomy of an HTML element</h1>
              </header>
              <p>Let's further explore our paragraph element from the previous section:</p>
              <img class="moderate" src="https://developer.mozilla.org/en-US/docs/Learn/HTML/Introduction_to_HTML/Getting_started/grumpy-cat-small.png" alt="grummp-cat">
              <p>The anatomy of our element is:</p>
              <ul>
                <li><strong>The opening tag:</strong> 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><strong>The content:</strong> This is the content of the element. In this example, it is the paragraph text.</li>
                <li><strong>The closing tag:</strong> 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>
            <section class="main-section" id="attribute">
              <header>
                <h1>Attribute</h1>
                </header>
                <p>Elements can also have attributes. Attributes look like this:</p>
                <img class="moderate" src="https://developer.mozilla.org/en-US/docs/Learn/HTML/Introduction_to_HTML/Getting_started/grumpy-cat-attribute-small.png" alt="grummpy-cat">
                <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>
                <ul>
                  <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>
                  </ul>
              </section>
              <section class="main-section" id="anatomy_of_an_html_document">
                <header>
                  <h1>Anatomy of an HTML document</h1>
                  </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>
                  <pre><code >&lt;!DOCTYPE html&gt;
&lt;html lang="en-US"&gt;
  &lt;head&gt;
    &lt;meta charset="utf-8" /&gt;
    &lt;title&gt;My test page&lt;/title&gt;
  &lt;/head&gt;
  &lt;body&gt;
    &lt;p&gt;This is my page&lt;/p&gt;
  &lt;/body&gt;
&lt;/html&gt;</code></pre>
<p>Here we have:</p>
<ul>
  <li>&lt;!DOCTYPE html&gt;: The &lt;!DOCTYPE html&gt; is the shortest string of characters that counts as a valid doctype.</li> 
  <li>&lt;html&gt;&lt;/html&gt;:The &lt;html&gt; element. This element wraps all the content on the page. It is sometimes known as the root element.</li>
  <li>&lt;head&gt;&lt;/head&gt;:The &lt;head&gt; element. 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.
    <p>for example:</p>
    <pre><code>&lt;head&gt;
      &lt;meta charset="UTF-8"&gt;
      &lt;title&gt;&lt;/title&gt;
      &lt;link rel="" href="" /&gt;
      &lt;/head&gt;</code></pre>
  </li>
  <li>&lt;meta charset="UTF-8"&gt;:The &lt;meta&gt; element. This element represents metadata that cannot be represented by other HTML meta-related elements, like &lt;base&gt;, &lt;link&gt;, &lt;script&gt;, &lt;style&gt; or &lt;title&gt;. 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>&lt;title&gt;&lt;/title&gt;:The &lt;title&gt; element. 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>
  <li>&lt;body&gt;&lt;/body&gt;:The &lt;body&gt; element. This contains all the content that displays on the page, including text, images, videos, games, playable audio tracks, or whatever else.</li>
  </ul>
                </section>
                <section class="main-section" id="entity_reference_including_special_characters_in_html">
                  <header>
                    <h1>Entity references: Including special characters in HTML</h1>
                    </header>
                    <p>In html, the characters &lt;, &gt;, &quot;, &apos;, and &amp; 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 (&amp;), and ends with a semicolon (;).</p>
                    <table>
                      <tr>
                        <th>Literal Character</th>
    <th>Character Reference Equivalent</th>
  </tr>
  <tr>
    <td>&lt;</td>
    <td>&amp;lt;</td>
  </tr>
  <tr>
    <td>&gt;</td>
    <td>&amp;gt;</td>
  </tr>
  <tr>
    <td>&quot;</td>
    <td>&amp;quot;</td>
  </tr>
  <tr>
    <td>&apos;</td>
    <td>&amp;apos;</td>
  </tr>
  <tr>
    <td>&amp;</td>
    <td>&amp;amp;</td>
  </tr>
</table>
<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.</p>
                  </section>
                  <section class="main-section" id="html_comments">
                    <header>
                      <h1>HTML Comments</h1>
                      </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 &lt;!-- and --&gt;. For example:</p>
                      <pre><code>&lt;!-- &lt;p&gt;I am!&lt;/p&gt; --&gt;</code></pre>
                    </section>
                    <section class="main-section" id="reference">
                      <header>
                        <h1>Reference</h1>
                        </header>
                          <p>All the documentation in this page is taken from <a href="https://developer.mozilla.org/en-US/docs/Learn/HTML/Introduction_to_HTML/Getting_started#what_is_html">MDN</a></p> 
                      </section>

I’ve edited your code for readability. When you enter a code block into a forum post, please precede it with a separate line of three backticks and follow it with a separate line of three backticks to make it easier to read.

You can also use the “preformatted text” tool in the editor (</>) to add backticks around text.

See this post to find the backtick on your keyboard.
Note: Backticks (`) are not single quotes (').

here these don’t match, check your other titles for similar issues

thank you very much. appreciated