kbd

< html‎ | elements
Jump to: navigation, search

kbd



Summary

The kbd element represents user input. Typically used to represent keyboard input, although it may be used to represent other user input, such as voice commands.


Overview Table

DOM Interface HTMLElement

HTML information

Closing Tag required
CSS Display inline

Examples

This example uses the kbd element to convey a command line command to the user.

HTML

<p>
Type the command <kbd>git status</kbd> to see the working tree status.
</p>

This example illustrates using kbd to indicate keystrokes.

HTML

<p>
Press <kbd><kbd>Ctrl</kbd>+<kbd>s</kbd></kbd> to save your document.
</p>


Members

The kbd object has these types of members:

  • [#events Events]
  • [#methods Methods]
  • [#properties Properties]


Events

The kbd object has these events. {

Related specifications

Specification Status Related Changes
HTML 4.01 W3C Recommendation
HTML 5 W3C Candidate Recommendation

Compatibility

Desktop

Feature Chrome Firefox (Gecko) Internet Explorer Opera Safari
Basic support ? ? ? ? ?

Mobile

Feature Android BlackBerry Chrome for mobile Firefox Mobile (Gecko) IE Mobile Opera Mobile Opera Mini Safari Mobile
Basic support ? ? ? ? ? ? ? ?

Attribution

This article contains content originally from external sources.

Portions of this content come from the Microsoft Developer Network: [Windows Internet Explorer API reference Article]