Tags are instructions that are embedded directly into the text of a HTML document. Each HTML tag describes that the browser should do something instead of simply displaying the text. In HTML, the tags begin with (<) and end with (>)
HTML tags can be of two types. They are
1. Paired Tags
2. Unpaired Tags
A tag is said to be a paired tag if the text is placed between a tag and its companion tag. In paired tags, the first tag is referred to as Opening Tag and the second tag is referred to as Closing Tag.
<i>This text is in italics. </i>
Note: Here <i> is called opening tag. and </i> is called closing tag.
An unpaired tag does not have a companion tag or closing tag. Unpaired tags are also known as Singular or Stand-Alone Tags.
<br> , <hr>
etc. These tags does not require any companion tag.
Tags Based on their utility
We can differentiate tags based on the purpose they used. Basically we have three types here
We manage the size of the font, underline part of the text, make the text bold etc by using tags like <font>, <u>,<b> etc.
Tables , Div, span tags are used for layout and formatting of content.
Description , title , head , body etc are part of the page structure tags. They are part of the basic html page and does not directly affect the formatting of text or image.
Form tags, Script tags, Radio buttons etc are part of the control tags. These tags are used to manage content or mange external scripts or libraries ( JQuery , Bootstrap )
All form tags like input text box, dropdown list, radio buttons etc are used for interaction with user. These tags can be formatted by using style properties.