When writing in HTML, the tag is an inline element used to designate that a section of text is keyboard input. The following sections contain information about this tag, including an example of it in use, and related attributes, browser compatibility.

Example of code

Press the Ctrl+C keys to copy highlighted text.

Example result

Press the Ctrl+C keys to copy highlighted text.

This element is unique in that it is a phrase tag, which indicates that a section of text has structural meaning.

  • Example of code
  • Example result
  • Attributes
  • Compatibility
  • Additional phrase tags
  • Related information

By default, text contained in the kbd tag uses a monospace font given to it from the browser. However, adding CSS settings as we’ve done above gives the tag’s text an even better appearance.

Attributes

Within an HTML tag, an attribute dictates certain aspects of an HTML element. Attributes are made up of a name and value pair. While the tag does not have any unique attributes, it does utilize all of the standard attributes.

Compatibility

Additional phrase tags

Browser, Compatibility, Container tag, Input, Keyboard, Web design terms

  • HTML and web design help and support.