HTML <kbd> Tag

If this site has been useful, we’d love your support! Running this site takes time and resources, and every small contribution helps us keep creating valuable content. Consider buying us a coffee to keep things going strong!

Description

The <kbd> HTML tag is used to define keyboard input or user-generated text within a document. It is typically displayed in a monospaced font to indicate that the enclosed text represents something that a user would type on a keyboard. This tag is commonly employed in documentation, tutorials, or any content where it's important to distinguish between regular text and user input, making it clear what the user should type or interact with on their keyboard.

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.

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 table will show you the current browser support for the HTML <kbd> tag.

Desktop
Edge Chrome Firefox Opera Safari
1211154
Tablets / Mobile
Chrome Firefox Opera Safari Samsung Webview
184143.214.4

Last updated by CSSPortal on: 30th September 2023