HTML <kbd> Tag
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 | |||||
12 | 1 | 1 | 15 | 4 |
Tablets / Mobile | |||||
18 | 4 | 14 | 3.2 | 1 | 4.4 |
Last updated by CSSPortal on: 30th September 2023