HTML Text Formatting
HTML Text Formatting
HTML Formatting Tags
HTML uses tags <b>("bold") and <i>("italic") to format output text, such as bold or italic.
These HTML tags are called formatting tags (see the complete tag reference manual at the bottom).
| | Typically, the <strong> tag replaces the bold tag <b> and <em> replaces the <i> tag. <br> <br>However, the meanings of these tags are different: <br> <br><b> and <i> define bold or italic text. <br> <br><strong> or <em> means the text you are presenting is important and should be highlighted. Today, all major browsers can render various font effects. However, future browsers may support better rendering effects. | | --- | --- |
Online Examples
Strikethrough and Inserted Text Effects
HTML Text Formatting Tags
Tag | Description |
---|---|
<b> | Defines bold text |
<em> | Defines emphasized text |
<i> | Defines italic text |
<small> | Defines smaller text |
<strong> | Defines strong text |
<sub> | Defines subscripted text |
<sup> | Defines superscripted text |
<ins> | Defines inserted text |
<del> | Defines deleted text |
HTML "Computer Output" Tags
Tag | Description |
---|---|
<code> | Defines computer code |
<kbd> | Defines keyboard input |
<samp> | Defines sample output from a computer program |
<var> | Defines a variable |
<pre> | Defines preformatted text |
HTML Citation, Quotation, and Definition Tags
Tag | Description |
---|---|
<abbr> | Defines an abbreviation |
<address> | Defines an address |
<bdo> | Defines text direction |
<blockquote> | Defines a long quotation |
<q> | Defines a short quotation |
<cite> | Defines a citation |
<dfn> | Defines a definition term |