Types of Tags in HTML
In this article, we will see about types of tags in HTML.
Types of Tags
It is important to know how HTML tags behave on the browser. That is how they display content on the browser and how much amount of space they occupied on the browser. This knowledge will help you when you start laying out your content on the browser.
HTML paired tag
If any HTML tag has a separate opening and a separate closing tag then such HTM Ltag is known as a paired tag. Ex: <title>, <body>
HTML unpaired tag
If any HTML tag has both opening and closing tags in a single tag then such an HTML tag is known as an unpaired tag. <br/>, <img>, <input> tags are examples of unpaired tags because they have no closing tag.
HTML block-level tag
If an HTML tag always displays the content on the new fresh line and occupies the complete available width of its parent tag then such an HTML tag is known as block level tag. <h1> – <h6> tag is an example of a block-level tag.
HTML inline-level tag
If an HTML tag occupies the exact amount of space required to display the content on the browser, and will not move the content to the new line, such an HTML tag is known as an inline tag. (i.e It puts the content on the same line and won’t take any extra space on the browser). The <u> – underline tag is an example for inline level tag.