HTML Tags

HTML tags are the invisible keywords of webpage. By using the tags a webpage can differentiate between the HTML content and simple content which are visible to the webpage. Tags are the most important part of HTML document. Without tags a HTML code cannot be written.

There are two types of Tags. One is paired tags and another is single tags. The paired tags have the opening and closing tags. such as: <b>...<b> and the single tags have only the opening tag. such as: <img>.

There are lot of tags in HTML.


Single Tags

<img>, <br>, <hr>, <area>, <col>, <base>, <meta>, <link>, <input> etc. are the single tags.

Example:

<link href = "style.css">
<img src = "images.jpg">
<br>
<hr>

Run Example

Paired Tags

<html>...</html>, <head>...</head>, <body>...</body>, <span>...</span>, <h1>...</h1>, <p>...</p>, <a>...</a>, <i>...</i>, <div>...</div> etc. are the paired tags.

Example:

<!DOCTYPE html>
<html>
<head>
<title> Page Title </title>
</head>

<body>
<h1> This is a Heading. </h1>
<p> This is a paragraph. </p>
</body>
</html>

Run Example