HTML Tutorial – HTML Tags

This HTML tags post provides complete information about Paired tags and Non paired tags with suitable examples. This post also provides information like locations of HTML page such as Head location and Body location.

Html language having two types of tags. An element placed in angular brackets is called “tag”.

1) Pair tags:

  • It is called Non-empty element.
  • Pair tag is a combination of a start tag and end tag.
  • All containers come under pair tags.

Syntax : <start tag> Content </end tag>

Example-1: <body>Content</body>
Example-2: <html><body><h1>Content</h1></body></html>

2) Non-pair tags:

  • It doesn’t have an end tag.
  • It is also called empty element.
  • for examples <br/>, <img/>


Every HTML document contains mainly 2 locations :


The data which is not displayed on the web page
1) titles information
2) styles information(CSS)
3) java script logic
4) Connections between web pages
5) information to search engine

The data which is displayed on the web page
1) Headings
2) HyperLinks
3) Button, Text Fields, Images…..


Note the following :
  • HTML is errorless language, that means it will not provide any information about the error.
  • Every Browser is having an interpreter to run HTML code.
  • Interpreters directly run the logic without compilation, this is the reason why HTML is not providing error details.
  • As a programmer, we can find the bug only when intended output will not be produced.
  • It is hard to find the bug in the HTML document with no proper information.

<head><title>My first web page</title></head>
<body> <h1> Welcome to html </h1> </body>


Welcome to html

Note: In the above program we wrote the word ‘body’ without using angular brackets. So it will not exhibit any kind of functionality. It will directly display on the screen.

Errorless language :

<head>welcome to html</head>

  • Here we have written the message using head tag but it displays on the web page.
  • But in all the situations it will not display the messages as we expected in case of coding mistakes, hence better to follow the rules.

> Learn HTML attributes – HTML tutorial <

Share this