HTML Text Formatting
HTML contains several elements for defining text with a special meaning.
Example
I am bold
I am italic
I am subscriptandsupersubscript
HTML formatting elements.
formatting elements were design to display special tpyes of text.
- HTML bold will be < b>- bold text
- HTML strong will be < strong>- important text
- HTML italic will be < i>- Italic text
- HTML Emphasized will be < em>- imphasize text
- HTML marked will be < mark>- marked text
- HTML small will be < small>- smaller text
- HTML deleted will be < del>- deleted text
- HTML inserted will be < ins>- inserted text
- HTML subscript will be < sub>- subscript text
- HTML superscript will be < sup>- superscript text
HTML < b> and < strong > elements.
The HTML < b> defines bold text without any extra important.
Example
This is a bold
The HTML < strong>element defines text with strong importance. The content inside is typicaly displayed in bold.
Example
HTML < i> and < em> Elements
The HTML < i>element defines a part of text in an alternate voice or mood. The content inside is typically displayed in italic.
Tips:The < i>tag is often used to indicate a technical term a phrase from another language a thought a ship name etc.
Example
The HTML < em>element defines emphasized text. The content inside is typically displayed in italic.
Tips:A screen reader will pronounce the words in < em> with and emphasize using verbal stress.
Example
HTML < small> Element
The HTML < small>element defines smaller text.
Example
HTML < mark > element
The HTML < mark>element defines text that should be marked or highlighted.
Example
This is a background colorYellow mark
HTML < del > Element
The HTML < del>element defines text that has been deleted from a document. browsers will usually strike a line through deleted text.
Example
This is a deleted deleted deleted of line
HTML < ins > element
The HTML < ins > element define a text that has been inserted into a document. browsers will usually underline inserted text.
Example
My favorite color is red green
HTML < sub > element
The HTML < sub > element defines subscript text subscript text appears half a character below the normal line and is sometimes rendered in a smaller font. subscript text can be used for chemical formulas like H2O:
Example
This is Subscripttext.
The HTML < sup > element
The HTML < sup > element defines superscript text superscript text appears half a character above the normal line and is something rendered in a smaller font. superscript text can be used be used for footnotes like WWW[1].