Heading: The <h1> to <h6> tags are used to define HTML headings. <h1> defines the most important heading and <h6> defines the least important heading.

Blog Header
Home Page – Basic Engineer

The syntax of <h1> to <h6> tags are

<h1 [align =”left” | “center” | “right” | “justify”] . . . </h1>

The “align” attribute is optional. It defines the horizontal alignment of its content.

  • <h1 [align =”left” | “center” | “right” | “justify”] . . . </h1>
  • < h2 [align =”left” | “center” | “right” | “justify”] . . . </h2>
  • <h3 [align =”left” | “center” | “right” | “justify”] . . . </h3>
  • <h4 [align =”left” | “center” | “right” | “justify”] . . . </h4>
  • <h5 [align =”left” | “center” | “right” | “justify”] . . . </h5>
  • <h6 [align =”left” | “center” | “right” | “justify”] . . . </h6>

Possible values are :

  • left : Text is align to the left margin.
  • right : Text is align to the right margin
  • center : Text is center.
  • justify : Text is justified to both margins.


    <title>Title of the document</title>
  <body style="background-color:gray">
    <h1>Simply Easy Learning</h1>
    <h2>Simply Easy Learning</h2>
    <h3>Simply Easy Learning</h3>
    <h4>Simply Easy Learning</h4>
    <h5>Simply Easy Learning</h5>
    <h6>Simply Easy Learning</h6>


Text Formatted tags

The text on an HTML page can be altered a number of ways. The following table explains different generally used text formatting tags:

<b>Defines bold text.
<i>Defines a part of text in an alternate voice or mood.
<strong>Defines important text.
<sub>Defines subscript text.
<sup>Defines superscript text.
<tt>Defines teletype text.
<br>Insert a single line break.
<pre>Defines preformatted text. Text in a element is displayed in a fixed-width font (usually Courier), and it preserves both spaces and line breaks
Escape Sequence Characters:These characters start with an
ampersand (&) and terminated with semicolon (;)
&amp;Displays &
&ltDisplays <
&gtDisplays >
&quotDisplays “
&nbspDisplays blank space
&copyDisplays ©
<basefont>Specifies a default font-color, font-size, or font-family
for all the text in a document.
The syntax is <basefont size=”n” >. . . . . . </basefont>.
<font>Specifies the font face, font size, and font color of text.


    <title>Title of the document</title>
<b>This text is bold</b>
<strong>This text is important</strong>
<i>This text is italic</i>
<em>This text is emphasized</em>
<small>This is some smaller text</small>
<p>Do not forget to buy <mark>milk</mark> today</p>
<p>My favorite color is <del>blue</del> red</p>
<p>My favorite color is <del>blue</del> <ins>red</ins></p>
<p>this is  <sub>subscripted</sub> text.</p>
<p> this is  <sup>superscripted</sup> text.</p>


formatted tags example
formatted tags example

Advantage of HTML

  • All browser supports is HTML.
  • HTML is light weight.
  • HTML is a fast to load.
  • It is easy to learn.

Dis-Advantage of HTML

  • It not secure because we can view source code of any web page after right clicking.
  • It is execution is slow due to “interpreter”.
  • It can not perform any arithmetic and logical operation.
  • Some browser do not support all tag of html.

How to write HTML Program

  • Notepad
  • Notepad++
  • Visual Studio
  • and other editor.

How to execute ?

Duble click on html file.

How to save ?

It must be saved with the help of (.html or ,htm) extention.

For example :- C\html\welcome to basic.html .

If you have any queries regarding this article or if I have missed something on this topic, please feel free to add in the comment down below for the audience. See you guys in another article.

To know more about HTML element please check Wikipedia link Click here

Stay Connected Stay Safe. Thank you

Basic Engineer

Hey Readers! We have more than fifteen years of experience in Software Development, IoT, Telecom, Banking, Finance and Embedded domain. Currently we are actively working on Data Science, ML and AI with multiple market leaders worldwide. Happy Reading. Cheers!


Leave a Reply

Avatar placeholder

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