Each HTML document must have some text such as headings, paragraphs, etc. So a question must be knocking at your mind! i.e. how to add the text on the page and how to style the text i.e. how to highlight the important content, how to bold the content, etc. The bellow-given HTML tags will provide the solution of all the above mentioned questions:
The HTML headings determine the headings or subheadings in any webpage. The HTML headings are graded between <h1> to <h6>. <h1> shows maximum priority while <h2> has slightly less priority and so on up to <h6> which shows minimum priority.
These headings play a significant role to format an HTML document as shown in the following example:
The above piece of code will provide the following output:
HTML <b> tag
<b> tag used to bold the text.
Below given code enclosed “linuxhint.com” in the <b> tag:
As a result we will get the following output:
HTML <i> tag
<i> tag convert the text into italic style.
The below given code utilizes the <i> tag to show important content in italic style:
HTML <strong> tag
<strong> tag is used to make the content prominent.
The following piece of code will implement the <strong> tag to emphasize the important content:
It generates the following output:
HTML <mark> tag
It is used to highlight some specific content
The below piece of code will highlight the content that comes within the <mark> tag.
The <mark> tag will generate the following output:
HTML <em> tag
<em> used to emphasize the certain text. The content enclosed within <em> tag appear in italic font style.
This piece of code will emphasize the significant text:
Output will be something like this:
HTML <small> tag
It decreases the text size.
This example elaborates the working of <small> tag:
Above given code includes two paragraphs. A normal paragraph and a paragraph with <small>tag. Observe the difference in the following output:
HTML <big> tag
It increases the text size.
The below piece of code creates two paragraphs first one is a normal paragraph while the second one utilizes the <big> tag:
The above code will show the following output:
HTML <u> tag
<u> tag is used to underline the content.
The below code underlined the text that is enclosed in the <u> tag
Above code generates the following output:
HTML <sub> & <sup> tag
<sub> used to make the content subscript, while <sup> tag makes the content superscript.
This code creates two paragraphs, first one utilizes the <sup> tag while second paragraph utilizes the <sub> tag:
Following output will appear for the above code:
HTML <ins> & <del> tag<
The <ins> tag specify the inserted content, while <del> specify the deleted content in the document.
This example will utilize the insert and delete tags in a paragraph:
The below given output will determine the working of <ins>, <del> tag:
HTML Preformatted tag
HTML offers a <pre> tag to show the preformatted content i.e. it will show the same content as written in the HTML file.
The following example will help you understand the concept of <pre> tag:
Normally if we write something in the <p> tag, the <p> tag automatically eliminates the extra spaces, line breaks, etc. However, the predefined tag works differently. The following output will verify that <pre> tag display the exact content as written in the HTML document:
HTML formatting tags can perform multiple functionalities on the text like bold, italic, subscript, superscript, highlight, emphasize, insert, delete, underline, using <b>, <i>, <sub>, <sup>, <mark>, <em>, <ins>, <del>, <u> tags respectively. This write-up described a comprehensive overview of different formatting tags along with their appropriate examples to have profound understanding of each formatting tag.