<kbd>
The <kbd> element represents textual user input, such as keyboard or voice input, styling text in monospaced type by default.
Overview
The <kbd> element represents textual user input, such as keyboard or voice input, styling text in monospaced type by default.
Browser support
| Feature | Desktop | Mobile | ||||
|---|---|---|---|---|---|---|
| Chrome | Edge | Firefox | Safari | Chrome Android | Safari iOS | |
| 1 | 12 | 1 | ≤4 | 18 | ≤3.2 | |
1+Supported (version) Not supported ※Has note Sub-feature descriptions sourced from MDN Web Docs (CC BY-SA 2.5)
Notes 1 item(s)
Implementation note
- Before Firefox 4, creating a <kbd> element incorrectly resulted in an `HTMLSpanElement` object, instead of the expected `HTMLElement`.
Syntax
HTML
<p>To save, press <kbd>Ctrl</kbd> + <kbd>S</kbd>.</p>
<p>Press the <kbd>Enter</kbd> key to confirm.</p> Live demo
Use cases
Using <kbd>
The <kbd> element represents textual user input, such as keyboard or voice input, styling text in monospaced type by default.
Cautions
- May not be supported in older browsers.
Accessibility
- Verify how this element is announced by screen readers.
Related links
Powered by web-features