How to indicate text is important in HTML ?
Last Updated :
17 Nov, 2021
In this article, we will know how to indicates the important text or mark texts as important in HTML. There are several HTML elements that are used for defining text with a special meaning. There are several formatting elements in HTML, some of them are <strong>, <b>, <i>, <em>, <mark>, <small>, <sup>, <sub>, <ins>, <del>.These are the parsed tag that are used to display the importance of the text.
Syntax:
- <strong>: The <strong> tag is the parsed tag and is used to show the importance of the text that makes the text bold.
<strong>Text Content</strong>
- <b>: It is used to specifies the bold text without any extra importance
<b>Bold Text</b>
- <i>: It is used to display the content in italic style.
<i>Italic text</i>
- <em>: It is a phrase tag and is used to emphasize the text content.
<em>Emphasized Text</em>
- <mark>: It is used to define the marked text.
<mark>Marked Text</mark>
- <small>: It is used to set small font size.
<small>Smaller Text</small>
- <sup>: It is used to describes the text as a superscript text.
<sup>Superscripted Text</sup>
- <sub>: It is used to write text below the baseline of the text in a smaller font.
<sub>Subscripted Text</sub>
- <ins>: It is used to specify a block of inserted text.
<ins>Inserted Text</ins>
- <del>: It stands for delete and is used to mark a portion of text which has been deleted from the document.
<del>Deleted Text</del>
We will utilize the above tags to make the important text & also understand their implementation in HTML.
Example: This example illustrates the use of the various HTML tags for making the text as important.
HTML
<!DOCTYPE html>
< html >
< head >
< title >Important texts</ title >
</ head >
< body >
< h1 >GeeksforGeeks</ h1 >
< h3 >How to indicate the text as important in HTML</ h3 >
< hr />
< p >This is normal text</ p >
< p >< strong >Important Text using strong tag</ strong ></ p >
< p >< b >Bold text using b tag</ b ></ p >
< p >< i >Italic text using i tag</ i ></ p >
< p >< em >Emphasized text using em tag</ em ></ p >
< p >< mark >Marked text using mark tag</ mark ></ p >
< p >< i >Italic text using i tag</ i ></ p >
< p >< small >Small text using small tag</ small ></ p >
< p >< sup >Superscripted text</ sup > using sup tag</ p >
< p >< sub >Subscripted text</ sub > using sub tag</ p >
< p >< ins >Inserted text</ ins > using ins tag</ p >
< p >< del >Deleted text</ del > using del tag</ p >
</ body >
</ html >
|
Output:
Supported Browsers:
- Google Chrome 94.0
- Firefox 93.0
- Microsoft Edge 94.0
- IE 11.0
- Safari 15.0
- Opera 80.0
Like Article
Suggest improvement
Share your thoughts in the comments
Please Login to comment...