HTML Formatting


We can format our text in HTML by Many ways,various tags are available in HTML for formatting


Basic Formatting Elements

Sr.No Tag Name Description
1 <b> Make the Text Bold
2 <strong> Make the Text Important
3 <i> Make the Text italic
4 <em> Make the Text Emphasize
5 <mark> Make the Text Highlighted
6 <small> Make the Text Small
7 <del> Indicates that Text is deleted
8 <ins> Indicates that Text is Inserted
9 <sub> Defines the Subscipt text
10 <sup> Defines the Superscipt text
11 <u> Make the Text Underline
12 <strike> Make the Text Strike
13 <big> Makes the Text Big


A Sample Formatting Example

<!DOCTYPE html>
<html>
<head>
<title>Page Title</title>
</head>
<body>
<b>My text is bold</b>

<strong>My text is important</strong>

<i>My text is italic</i>

<em>My text is emphasize</em>

<p>I drink <mark>milk</mark> Daily</p>

<small>My Text is smaller</small>

<p>My Shirt color is <del>red</del></p>

<p>My Shirt color is <del>red</del> <ins>pink</ins></p>

<p>My Text is <sub>subscripted</sub> text.</p>

<p>My Text is <sup>superscripted</sup> text.</p>

<p>My Text is <u>underlined</u></p>

<p>My Text is <strike>strikethrough</strike> content</p>

<p>My Text uses a <big>big</big> Interface</p>

</body>
</html>

Bold and Strong Tag

The <b> Tag makes the text of the element Bold

<b>This text is bold</b>

The <strong> Tag makes the text of the element Bold with importance

<strong>This text is important</strong>

Italic and emphasized Tag

The <i> Tag makes the text of the element Italic

<i>This text is italic</i>

The <em> Tag makes the text of the element italic with emphasized

<em>This text is emphasized</em>

Small Tag

The <small> Tag makes the text of the element smaller

<small>This text is small</small>

Mark Tag

The <mark> Tag makes the text of the element highlighted

<mark>This text is highlighted</mark>

Delete Tag

The <del> Tag makes the text of the element deleted

<del>This text is deleted</del>

Insert Tag

The <ins> Tag makes the text of the element inserted

<ins>This text is inserted</ins>