Loading

KEYPOINTS

The HTML file is made up of elements
Elements are responsible for creating and defining content in the web page.



Syntax:

<tagname>content</tagname> 

  • The opening tag, which begins with the name of the HTML element. It indicates where the element starts and may include attributes that provide additional information or behavior for that element.
  • The actual text, media, or nested HTML elements enclosed between the opening and closing tags. This content is what will be displayed or rendered by the browser
  • The closing tag, which is similar to the opening tag but starts with a forward slash (`/`). It marks the end of the HTML element, signaling to the browser that the element is complete. 
  • The closing tag ensures that the content is correctly interpreted and styled as intened

Starting TagContent          Ending Tag   
<h1>This is Heading</h1>
<p>This is Paragraph</p>
<br>nonenone

Example:

<!doctype html>
<html>
    <head>

       <title>Quipo House</title>
    </head>

  <body>
  <h1>My First Heading</h1>
  <p> My First Paragraph</p>
  </body>

</html>
 

Output:

          

 


Nested Elements

  • Nesting HTML elements involves placing one element inside another, creating a hierarchical structure. 
  • This allows for organized and structured content presentation on web pages.

Example:

<!doctype html>
<html>
    <head>

       <title>Quipo House</title>
    </head>

  <body>
  <h1>My First <b> Bold Heading </b></h1>
  <p> My First <i> Italic Paragraph <i></p>
  </body>

</html>