HTML tag
Example
Formatting text in a document:
<
kbd
Keyboard input
kbd
Try it »
Browser support
| Element | |||||
|---|---|---|---|---|---|
| Yes | Yes | Yes | Yes | Yes |
Tag Definition and Usage Notes
The tag defines keyboard text style.
The HTML keyboard input element () is used to represent user input; it produces an inline element displayed in the browser's default monospace font.
Tip: It is not recommended to use the tag; using CSS to achieve richer effects is more recommended.
All phrase tags:
| tag | Description |
|---|---|
| Rendered as emphasized text. | |
| Defines important text. | |
| Defines a definition term. | |
|
Defines computer code text. |
| Defines sample text. | |
| Defines keyboard text. It indicates that the text was typed on a keyboard. It is often used in computer-related documents or manuals. | |
Defines a variable. You can use this tag together with
及 |
More examples
Example
Formatting text in a document:
<
p
Enter in the dialog box:
<
kbd
cmd
kbd
<
br
/>Then click the OK button.
p
<
p
Use the shortcut key to save the file
<
kbd
Ctrl
kbd
<
kbd
S
kbd
pTry it »
Differences between HTML 4.01 and HTML5
none.
Global Attributes
The tag supports global attributes; see the full list in HTML Global Attributes.
Event attribute
The tag supports all HTML Event Attributes.
Related Articles
HTML Tutorial: HTML Text Formatting