CSS Portal

HTML <kbd> Tag

☕
Enjoying this site?

Help keep it running with a small coffee donation. Every bit of support is appreciated!

Buy us a coffee
<kbd>
HTML TagThis tag is supported by all modern browsers.
Updated 26th December 2025

Description

The <kbd> HTML element represents user input that is typically entered via a keyboard, voice command, or other input device. It is commonly used to indicate a string of characters that a user should type, such as commands, keyboard shortcuts, or textual input. The content inside a <kbd> element is usually displayed in a monospaced font by default, helping it visually stand out as user input from surrounding text.

For example, when documenting instructions or tutorials, the <kbd> element can clearly convey the exact keys or sequences a user needs to press, enhancing readability and comprehension. Multiple <kbd> elements can be combined to show key combinations, often joined by symbols like + or →.

While <kbd> is mainly associated with keyboards, it is semantically appropriate for any user interaction input that is explicitly typed or executed by the user, not generated automatically by the system. This makes it particularly useful in technical documentation, guides, and instructional content, where clarity about user actions is crucial.

Properties

Permitted Parents
Any element that accepts phrasing content
Content
Inline and text
Start/End Tags
Start tag: required, End tag: required

Example

Type <kbd>https://www.cssportal.net</kbd> into your browser address bar.
Open in editor

Attributes

None

Global Attributes

The <kbd> tag also supports the Global Attributes in HTML5

Event Attributes

The <kbd> tag also supports the Event Attributes in HTML5

Browser Support

The following information will show you the current browser support for the HTML <kbd> tag. Hover over a browser icon to see the version that first introduced support for this HTML tag.

This tag is supported by all modern browsers.

Desktop

Chrome
Edge
Firefox
Opera
Safari

Tablets & Mobile

Chrome Android
Firefox Android
Opera Android
Safari iOS
Samsung Internet
Android WebView
-
Supported Unknown Not supported
☕
Enjoying this site?

Help keep it running with a small coffee donation. Every bit of support is appreciated!

Buy us a coffee