HTML includes a number of additional highlighting elements that can be used in Web pages, as shown in Table 3.1.
The TT (Teletype) element is a general purpose element that can be used anywhere you want to apply monospaced highlighting to text. Many of the other highlighting elements are logical elements meant to designate the purpose or function of the highlighted text. Some early browsers, however, may not support elements introduced with HTML 3.2 (STRIKE and U), whereas only the most recent browsers support elements introduced with HTML 4.0 (S, DEL, and INS).
Description |
Display |
|
---|---|---|
TT |
Teletype or Typewriter Text |
Monospaced text |
KBD |
Keyboard (Input) |
Monospaced text |
SAMP |
Sample Text (Output) |
Monospaced text |
CODE |
Program Code |
Monospaced text |
VAR |
Variable |
Italic text |
CITE |
Citation |
Italic text |
DFN |
Definition |
Italic text |
STRIKE (3.2) |
Strike |
|
S (4.0) |
Strikethrough |
|
DEL (4.0) |
Delete |
|
INS (4.0) |
Insert |
Underlined text |
U (3.2) |
Underline |
Underlined text |