| Depr. | Empty | Version |
|---|---|---|
| No | No | HTML 2 |
| IE5.5+ | FF1+ | SA1.3+ | OP9.2+ | CH2+ |
|---|---|---|---|---|
| Full | Full | Full | Full | Full |
Syntax
Description
The kbd
element is used to identify keystrokes that the user needs to make on his
or her keyboard. These keystrokes could form a string of text, or they
could reflect individual key presses that the user must complete (for
example, pressing Enter or Backspace). It’s most likely to be found in
online technical manuals or support sites.
Most browsers will render
kbd content in a monospace font, but it’s possible to
style its display with CSS (for example, setting a background color and a
border to make the character appear a little more like a key on a
keyboard).
The example HTML above would render as shown in Figure 1.
kbd element as
monospaced
Example
A support site that provides instructions to help Windows users to unfreeze an application might include the following HTML:
<p>Hold down <kbd>CTRL</kbd>, <kbd>ALT</kbd>, and <kbd>DELETE</kbd>,
then select Task Manager</p>
Use This For …
This element is used to identify individual key presses, complete words that must be typed, or buttons that should be pressed on a keypad.
Compatibility
| Internet Explorer | Firefox | Safari | Opera | Chrome | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 5.5 | 6.0 | 7.0 | 8.0 | 1.0 | 1.5 | 2.0 | 3.0 | 3.5 | 1.3 | 2.0 | 3.1 | 4.0 | 9.2 | 9.5 | 10.0 | 2.0 |
| Full | Full | Full | Full | Full | Full | Full | Full | Full | Full | Full | Full | Full | Full | Full | Full | Full |
The
kbd has good browser support; most major browsers
render it in a fixed-width font.
User-contributed notes
There are no comments yet.