HTML offered multiple phrase tags like <em>, <mark>, <abbr>, etc. All these phrases have the same goal i.e. to draw the user’s focus towards the important content. But all these tags do this in a unique way as described below:
HTML Abbreviation tag
HTML provides an abbreviation tag that is used to abbreviate the particular word/text. It is a paired tag represented by <abbr> and everything you want to abbreviate will be written inside the opening <abbr> and closing </abbr> tags.
Syntax of the <abbr> tag is given below:
Example How to use <abbr> tag in HTML
This example will create a paragraph and within <p> tag an abbreviation for the company name will be used:
When the cursor points to the abbreviated word, it will show the acronym of that word as shown in the below output:
HTML Strong tag
In HTML, any content written inside the <strong> tag enhances the significance of that content.
The syntax of the <strong> tag is given below:
Example How to use <strong> tag in HTML
The following piece of code will utilize a <strong> tag within the <p> tag which will make the content prominent:
In the bellow output, you will notice that from the entire paragraph the word “comments” is catching the user’s intentions:
HTML mark tag
The mark tag is used to highlight the important content. The notable content will be written between the starting <mark> and ending </mark> tag as shown in the below syntax:
Example How to use <mark> tag in HTML
This example includes the <mark> tag in the paragraph which will show the significance of HTML tags by highlighting it:
The above script will show the following output on successful execution:
HTML Emphasize tag
In HTML, any content scripted within the emphasized tag will be shown in the italic style. The syntax of the emphasize tag will be:
Example How to use <em> tag in HTML
This example will determine how to use the <em> tag:
The output will declare that the text written inside the <em> tag will appear in italic font style:
HTML Address tag
The address tag is usually used to provide the details about the author. Everything will come inside the <address> tag and it will display the result in italic style.
<address> tag follows the following syntax:
Example: How to use <address> tag in HTML
Consider the following program to understand the working of the <address> tag:
The above-given snippet utilized the <address> tag that will show the address in italic style. It utilized the <br> tag to add a line break between the name and email. The following output will appear:
HTML Code tag
The <code> tag is used show the code of any programing language. The syntax of the <code> tag will be
Example How to use <code> tag in HTML
The following script will demonstrate the text like coding i.e. in monospaced font:
From the output, we can observe that the content within the <code> tag follows the monospaced font:
Conclusion
HTML Phrase tags are used to show the importance of a specific part from the entire document. These phrase tags emphasize the crucial content. In this write-up, we studied some essential phrase tags such as <abbr>, <strong>, <mark>, <code>, <em>, and from the outputs, we observed that all these tags worked as attention grabbers.