Text Formatting
This text is bold
This text is italic
This is subscript and superscript
HTML Formatting Elements
In the previous chapter, you learned about the HTML style attribute.
HTML also Defines special elements for defining text with a special meaning.
HTML uses elements like and for formatting output, like bold or italic text.
Formatting elements were designed to display special types of text:
- - Bold text
- - Important text
- - Italic text
- - Emphasized text
- - Marked text
- - Small text
- Deleted text- - Inserted text
- - Subscript text
- - Superscript text
HTML and Elements
The HTML element defines bold text, without any extra importance.
Example
This text is bold
The HTML element defines strong text, with added semantic "strong" importance.
Example
This text is strong
HTML and Elements
The HTML element defines italic text, without any extra importance.
Example
This text is italic
The HTML element defines emphasized text, with added semantic importance.
Example
This text is emphasized
HTML Element
The HTML element defines smaller text:
Example
HTML Small Formatting
HTML Element
The HTML element defines marked or highlighted text:
Example
HTML Marked Formatting
HTML Element
The HTML element defines deleted (removed) text.
Example
My favorite color is blue red.
HTML Element
The HTML element defines inserted (added) text.
Example
My favorite color is red.
HTML Element
The HTML element defines subscripted text.
Example
This is subscripted text.
HTML Element
The HTML element defines superscripted text.
Example
This is superscripted text.
HTML Text Formatting Elements
Tag Description
Defines bold text
Defines emphasized text
Defines italic text
Defines smaller text
Defines important text
Defines subscripted text
Defines superscripted text
Defines inserted text
Defines marked/highlighted text
Data Source: www.w3schools.com