MDN may have intermittent access issues April 18 13:00 - April 19 01:00 UTC. See whistlepig.mozilla.org for all notifications.

mozilla
Your Search Results

    <kbd>

    Summary

    The HTML Keyboard Input Element (<kbd>) represents user input and produces an inline element displayed in the browser's default monospace font.

    Attributes

    This element only includes the global attributes.

    Examples

    <p>Type the following in the Run dialog: <kbd>cmd</kbd><br />Then click the OK button.</p>
    
    <p>Save the document by pressing <kbd><kbd>Ctrl</kbd>+<kbd>S</kbd></kbd></p>

    Result

    Note

    A CSS rule can be defined for the kbd selector to override the browser's default font face. Preferences set by the user might take precedence over the specified CSS.

    Specifications

    Specification Status Comment
    WHATWG HTML Living Standard
    The definition of '<kbd>' in that specification.
    Living Standard  
    HTML5
    The definition of '<kbd>' in that specification.
    Recommendation Expanded to include any user input, like voice input and individual keystrokes.
    HTML 4.01 Specification
    The definition of '<kbd>' in that specification.
    Recommendation  

    Browser compatibility

    Feature Chrome Firefox (Gecko) Internet Explorer Opera Safari
    Basic support (Yes) 1.0 (1.7 or earlier) (Yes) (Yes) (Yes)
    Feature Android Firefox Mobile (Gecko) IE Mobile Opera Mobile Safari Mobile
    Basic support (Yes) 1.0 (1.0) (Yes) (Yes) (Yes)

    See also