HTML Tags

HTML tags are like keywords which defines that how web browser will format and display the content. With the help of tags, a web browser can distinguish between an HTML content and a simple content. HTML tags contain three main parts: opening tag, content and closing tag. But some HTML tags are unclosed tags.
When a web browser reads an HTML document, browser reads it from top to bottom and left to right. HTML tags are used to create HTML documents and render their properties. Each HTML tags have different properties.

Types of HTML Tags

1.    Open Tag / Pair Tag / Container tag

2.    Empty tag / Singular tag / Unclosed tag

1.    Container tag

               Container tags are tags which have both opening as well as closing tag.for example <html>, <head>, <title>, <body>, <h1> etc.

Some example of Container tags are given below

Opening tags

Closing tags Descriptions
<html>            </html> Opens and closes an HTML document.
<head> </head>
The first of two main sections of an HTML document.
 The <head> section is used to provide information about the document for use primarily by search engines and browsers.
<title>         </title> The title of document. This element is nested inside the <head> section.
<body> </body>
The second of two main sections of an HTML document.
The <body> section contains all the content of the web page.
<h1>to <h6> </h1> to </h6> Heading 1 to Heading 6
<p> </p> Paragraph
<b> </b> Makes the contained text bold.
<em> </em> Gives the contained text emphasis (usually as italics).
<span> </span> A container for in-line content, such as content inside a paragraph.
<strong> </strong> Makes the contained text bold.
<ol>     </ol>                   
Ordered (numbered) list
<ul>     </ul> Unordered (bulleted) list
<table> </table> Table
<form> </form> Form

2.    Empty Tag

             empty tags are tags which have only opening tag .for example <br>, <hr>, <img>, <input>, <meta> etc.

Opening Tags Description
<br> It is used to break a line.
<hr> It is used to insert  a horizontal line.
<img> It is used to display images.
<input> It is as Input.
<link> efines relationships between the documents.
<meta> changes metadata of your web page.
<source> Inserts a media source.