Introduction to HTML

Updated on     Kisan Patel

HTML stands for Hypertext Markup Language. Hypertext is simply a piece of text. Markup Language is language of writing layout information within documents.

Basically an HTML document is a plain text file. It contains rich text. The rich text means text with tags.

How to Write HTML Program?

Any HTML program can be written in simple Notepad or Wordpad text editors. The extension to this program should be either .html & .htm. This program then can be opened in some web browser and the corresponding web page can be viewed.

The program consists of some strings enclosed within angular brackets. Such strings are called tags. The HTML program should be written within <html> and </html>.

The <html> part indicates the start of html program and </html> denotes end of html program. Use of slash(/) in the angular bracket indicates end of that particular tag.

Any HTML program has two prominent parts : head and body.

The head part acts as a header of a file and contains some information like setting the title of web page. In following example we have done the same thing. In the head part of HTML program we have added a title tag which sets the title to our web page as“My webpage”.

  <title>My webpage</title>

The body part of HTML program will help us to create a look and feel of the web page. Above given HTML program is the simplest one in which the web page contains the text ”My first webpage”.

  My first webpage!!!

One more thing, HTML is not a case sensitive language. You can write the program in any case it will be acceptable.


The comment in HTML can be denoted as follows :

<!--comment statement-->

There should not be a space between angular bracket and exclamation mark. This comment in beginning with <!--and ending with -->.

Commonly Used Tags

Following  are some commonly used tags for formatting the text:

TAG Meaning
<p>   This tag is should be put at the end of every paragraph.
<br> This tag causes a single line break. Generally it is kept at the end of every line. If we want more three blank lines to be inserted after some text then we can put <br><br><br>.  We get the line break automatically if the appearing on the web browser is too long. If we do not want suck break then <nobr> tag can be used for such text.
<pre> This tag is used to preserve the white spaces and lines in the text.
<div> This tag is used to make division of sections in the XHTML documents.


See the Pen gpJJrW by Kisan (@pka246) on CodePen.


Leave a Reply