HTML is made up of different tags and attributes. The tag is an HTML command that shows the layout or displays the desired output of a whole or part of the Web page. HTML tag is bound by angular brackets ( < > ) that always opens with a < (less than ) sign and closes with a > (greater than) sign. It controls the appearance, layout and flow of the Web page.
A tag contains three parts: element (identification of tag), attribute and value.
HTML tags can be of two types:
- Paired Tags
- Singular Tags
1. Paired Tags
It is also called container tag. A tag is said to a paired tag if it along with a companion tag or closing tag appears at the end. For example, the tag is paired tag. The tag with its closing tag is used to rendered in Bold Text. In paired tag, first tag is called the opening tag and the second tag is called the closing tag.
2. Singular Tags
The second type of tag is the singular tag, which is also known as a stand-alone tag or empty tag. The stand-alone tag does not have companion tag or closing tag.
For example : Other singular tags are:
Tags | Description |
<BR> | Insert a link break |
<HR> | Defines a horizontal rule |
<!--> | Defines a comment |