HTML Elements

An HTML Elements is described by using a starting tag. If the element incorporates other content, it ends with an ending tag, where the detailed call is preceded via a forward lessen as shown below with few tags.

Start tag Element content End tag
<h1> My First Heading </h1>
<p> My first paragraph. </p>
<h1> This is Heading Text </h1>
<div> The Division Tag </div>

HTML Elements

An HTML element generally consist of a start tag and an end tag, with the content inserted in between:

<tagname> ….Content goes here…      </tagname>

HTML elements with no content called empty elements. Empty elements don’t have an end tag, like the <br>
element (which indicates a line break).

HTML documents consist of a tree of those elements that specify how HTML documents should be built, and what quiet content should be placed in what a part of an HTML document.

Nested HTML Element:

Example:

<!DOCTYPE html>
<html>
  <head>
     <title>Soft CodeOn Nested Elements Example</title>
   </head>
   <body>
      <h1>This is <i>italic</i> heading</h1>
      <p>This is <u>underlined</u> paragraph</p>
   </body>
</html>

HTML5 doesn’t require empty elements to be closed. But if you would like stricter validation, or if you would like to form your document readable by XML parsers, you want to close all HTML elements properly.

The HTML5 standard does not require lowercase tags. But W3C suggested using lowercase in HTML language demands lowercase for stricter document types like XHTML.

HTML tags aren’t case sensitive: <H1>means an equivalent as</H1> .

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top