Having issue with my Technical Documentation Page

Please guys help me out, Am having issues with my technical documentation page, I wanted to shown some codes as example in my doc page, instead of returning the codes as example it’s showing me a different thing.

<!DOCTYPE html> 
<html>
    <head>
      <title>Technical Documentation Page</title>
  </head>
   <body>
     <!-- nav-bar below -->
     <nav id="navbar">
       <heaader>Html Documentation</header>
       <ul>
         <a class="nav-link" href="#Introduction" rel="internal"><li>Introduction</li></a>
         <a class="nav-link" href="#Html_Basic" re=l"internal"><li>Html Basic</li></a>
         <a class="nav-link" href="#Html_Element" rel="internal"><li>Html Elements</li></a>
         <a class="nav-link" href="#Html_Attributes" rel="internal"><li>Html Attributes</li></a>
         <a class="nav-link" href="#Html_Heading" rel="internal"><li>Html Heading</li></a>
         <a class="nav-link" href="#Html_Paragraphs" rel="internal"><li>Html Paragrahs</li></a>
         <a class="nav-link" href="#Html_Styles" rel="internal"><li>Html Styles</li></a>
       </ul>
     </nav>
     <!-- main contents -->
     <main id="main-doc">
       <section class="main-section" id="Introduction">
         <header>Introduction</header>
         <article>
           <p>HTML is the standard markup language for creating Web pages.</p>
           <li>HTML stands for Hyper Text Markup Language</li>
           <li>HTML describes the structure of Web pages using markup</li>
           <li>HTML elements are the building blocks of HTML pages</li>
           <li>HTML elements are represented by tags</li>
           <li>HTML tags label pieces of content such as "heading", "paragraph", "table", and so on</li>
           <li>Browsers do not display the HTML tags, but use them to render the content of the page</li>
           <h2>A Simple HTML Document</h2>
            Example:
           <code>
             
             <!DOCTYPE html>
<html>
<head>
<title>Page Title</title>
</head>
<body>

<h1>My First Heading</h1>
<p>My first paragraph.</p>

</body>
</html>
           </code>
         </article>
       </section>
       
     </main>
  </body>
</html>

I wanted to use the codes as exmple :

 <h2>A Simple HTML Document</h2>

but it’s return the output instead.thanks in advance .

Hi,

If you want to use a code example that includes HTML, you must use HTML entities for your < and >. If you don’t do this, it will be interpreted as actual HTML. Below are some links I think might help:
http://web.simmons.edu/~grabiner/comm244/weekfour/code-test.html

1 Like

wow, thank so much , let me check it out.