Easy Tutorial
❮ Canvas Settransform Att Track Kind ❯

HTML <kbd> Tag

Example

Formatting text in a document:

<kbd>Keyboard input</kbd>

Browser Support

Element Chrome Edge Firefox Safari Opera
<kbd> Yes Yes Yes Yes Yes

Tag Definition and Usage

The <kbd> tag defines keyboard text style.

The HTML Keyboard Input element (<kbd>) represents user input and produces an inline element displayed in the browser's default monospace font.

Tip: The <kbd> tag is not recommended. It is preferable to use CSS for richer effects.

All phrase tags:

Tag Description
<em> Renders as emphasized text.
<strong> Defines important text.
<dfn> Defines a definition term.
<code> Defines a piece of computer code.
<samp> Defines sample output from a computer program.
<kbd> Defines keyboard input. It indicates text that is typed on the keyboard and is often used in computer-related documents or manuals.
<var> Defines a variable. You can use this tag with <pre> and <code> tags.

More Examples

Example

Formatting text in a document:

<p>Enter in the dialogue window: <kbd>cmd</kbd><br />Then click the OK button.</p>

<p>To save the file, use the shortcut <kbd>Ctrl</kbd> + <kbd>S</kbd></p>

Differences Between HTML 4.01 and HTML5

None.


Global Attributes

The <kbd> tag supports global attributes. View the full list of HTML Global Attributes.


Event Attributes

The <kbd> tag supports all HTML Event Attributes.


Related Articles

HTML Tutorial: HTML Text Formatting

❮ Canvas Settransform Att Track Kind ❯