Basic HTML WEB PAGE!

Basic HTML Web Page

Here we go. The basic example of an HTML web page…

 <!DOCTYPE html>

<html>

  <head>

<title>Page Title</title>

  </head>

  <body>

    <header>

      <h1>Heading 1</h1>

      <nav>

        <ul>

          <li><a href="#">Link 1</a></li>

          <li><a href="#">Link 2</a></li>

          <li><a href="#">Link 3</a></li>

        </ul>

      </nav>

    </header>

 

    <main>

      <section>

        <h2>Heading 2</h2>

        <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean accumsan bibendum mauris, eget blandit odio commodo vitae.</p>

        <img src="image.jpg" alt="Image">

      </section>

 

      <section>

        <h2>Heading 2</h2>

        <p>Nullam lobortis neque vel tortor gravida, ut ultrices massa bibendum. Ut ut ultrices orci, in lacinia diam.</p>

      </section>

    </main>

 

    <footer>

      <p>Copyright © 2021</p>

    </footer>

  </body>

</html>

 Here's a breakdown of what this code is doing:

1.   1. The <!DOCTYPE html> declaration is necessary for the browser to know that this is an HTML5   document.
2.       The <html> element is the container for all other HTML elements.
3.       The <head> element contains meta information about the document, such as the title of the page.
4.       The <title> element sets the title of the webpage, which appears in the browser's title bar.
5.       The <body> element contains the visible page content.
6.       The <h1> element is a heading, and is used to introduce the main topic of the page.
7.       The <p> element is used for paragraphs of text.
8.       The <img> element is used to display an image on the page. The src attribute specifies the URL of the image, and the alt attribute provides a text description of the image for accessibility purposes.
9.       The <ul> element creates an unordered list, and the <li> elements create the list items.
10.   The <a> element creates a hyperlink, and the href attribute specifies the URL of the page the link goes to.
11.   The "li" element is used to define a list item within an ordered or unordered list. "li" stands for "list item."
12.   <nav>: This element is used to define a section of a web page that contains navigation links. It is typically used to create a menu or a list of links to different sections of the website.
13.   <section>: This element is used to define a section of a web page. It is often used to group related content together and give it a meaningful heading.
14.   <header>: This element is used to define the header of a web page or a section. It typically contains the page title, logo, and other important information.
15.   <h2>: This element is used to define a heading on the page. The number after the "h" (in this case, 2) indicates the level of the heading. The higher the number, the smaller the heading.
16.   <main>: This element is used to define the main content of the web page. It is typically used for the main article, blog post, or other primary content.
17.   <footer>: This element is used to define the footer of a web page or a section. It typically contains copyright information, contact details, and other relevant information.

         Of course, this is just a very basic example - there are many more HTML elements and attributes to explore!




Comments

Popular posts from this blog

Everything You Need to Know About freeCodeCamp!

WHAT ARE LOOPS? HOW WE USE IT. Explained 101

What Everyone Must Know About WHAT ARE CONDITIONAL STATEMENTS?