Widely available Supported across all major browsers. Safe to use in production.

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

ki-bo-dsho-tkat

Kbd element in ki-bo-dinput or sho-tkatki- display.

PreviewFullscreen

operationid

Kbd element in aprike-tion. operationorder Description.

PreviewFullscreen

kbd nested

Kbd nestedki-. combination representation.samp and. combination.

PreviewFullscreen

Use cases

  • Using <kbd>

    The <kbd> HTML element represents a span of inline text denoting textual user input from a keyboard, voice input, or any other text entry device.

Cautions

  • May not be supported in older browsers.

Accessibility

  • Verify how this element is announced by screen readers.