Character Display
Using HTML commands, you can have characters displayed in bold, italic, or typewriter fonts. Often, there are several commands available to produce the same effect:
- Physical commands directly declare whether the text should be displayed as bold, italic or typewriter.
- Logical commands identify the logical type of text (emphasized, strongly emphasized, keyboard, etc.).
Italics |
||
| Type | HTML | How It Displays |
|---|---|---|
| Italic | Suddenly Mary said <i>Eeeeeek</i>! | Suddenly Mary said Eeeeeek! |
| Emphasized Text | The rule is <em>VERY</em> important! | The rule is VERY important! |
| Definition of a term | A web is <dfn>an intricate structure suggestive of something woven</dfn>. | A web is an intricate structure suggestive of something woven. |
| Variable | Enter <var>login-id</var> here. | Enter login-id here. |
| Citation | <cite>Journal of Hysteria and Amnesia</cite> | Journal of Hysteria and Amnesia |
Bold |
||
| Type | HTML | How It Displays |
| Bold | At the first intersection, turn <b>left</b>. | At the first intersection, turn left. |
| Strongly Emphasized | <strong>DANGER!</strong> | DANGER! |
Typewriter (Fixed Width) Font |
||
| Type | HTML | How It Displays |
| Teletype | <tt>I wrote this on a Smith-Corona</tt> | I wrote this on a Smith-Corona |
| Code Fragment | <code>IF A=0|B=9</code> | IF
A>=0|B=9 |
| Keyboard Input | <kbd>PINE</kbd> | PINE |
Other Character Display Commands |
||
| Type | HTML | How It Displays |
| Underline | I read <u>Beowulf</u> last night. | I read Beowulf last night. |
| Delete | During the interrogation <del>John</del> Fred confessed to littering. |
During the interrogation |
| Big Text | The grizzly was <big>HUGE</big>. | The grizzly was HUGE. |
| Small Text | The bunny was <small>tiny</small>. | The bunny was tiny. |
| Subscript | The data is for sample<sub>2</sub> | The data is for sample2 |
| Superscript | E=MC<sup>2</sup> | E=MC2 |
Specifications
From the W3Schools.Com Complete HTML/XHTML Reference: