HTML Text Formatting
HTML Tutorial
HTML Text Formatting
CompletedText Formatting
This text is bold
This text is italic
This is subscript and superscript
Try it Yourself
HTML Formatting Elements
Completedwhen you studied the previous chapter, you came to know about the HTML style attribute.
HTML also has special elements which defines text with a special meaning.
HTML utilises elements like <b> and <i> inorder to format output, like bold or italic text.
Formatting elements were made for displaying special types of text:
- <b> - Bold text
- <strong> - Important text
- <i> - Italic text
- <em> - Emphasized text
- <mark> - Marked text
- <small> - Small text
- <del> - Deleted text
- <ins> - Inserted text
- <sub> - Subscript text
- <sup> - Superscript text
HTML and Elements
CompletedThe HTML <b> element is used to define bold text, without giving any extra importance.
The HTML <strong> element is used to define strong text, by adding semantic "strong" importance.
HTML and Elements
CompletedThe HTML <i> element is used to define italic text, without having any extra importance.
The HTML <em> element is used to define emphasized text, by adding semantic importance.
HTML Element
CompletedThe HTML <small> element is used to define smaller text:
HTML Element
CompletedThe HTML <mark> element is used to define marked or highlighted text:
HTML Element
CompletedThe HTML <del> element is used to define deleted (removed) text.
HTML Element
CompletedThe HTML <ins> element is used to define inserted (added) text.
<p>My favorite
<ins>color</ins> is red.</p>
Try it Yourself
HTML Element
CompletedThe HTML <sub> element is utilised for defining subscripted text.
<p>This
is <sub>subscripted</sub> text.</p>
Try it Yourself
HTML Element
CompletedThe HTML <sup> element is used to define superscripted text.
<p>This
is <sup>superscripted</sup> text.</p>
Try it Yourself
Test Yourself with Exercises
CompletedHTML Text Formatting Elements
Completed| Tag | Description |
|---|---|
| <b> | Defines bold text |
| <em> | Defines emphasized text |
| <i> | Defines italic text |
| <small> | Defines smaller text |
| <strong> | Defines important text |
| <sub> | Defines subscripted text |
| <sup> | Defines superscripted text |
| <ins> | Defines inserted text |
| <del> | Defines deleted text |
| <mark> | Defines marked/highlighted text |
