HTML DOM Kbd Object | KBD Object | HTML KBD Tutorial

HTML DOM Kbd Object

Below we have a basic example where we have used the <kbd> tag wherever we have mentioned the Keyboard keys in text on our webpage.

Now, we will show you how to use <kbd> tag inside <samp> tag. Whenever <kbd> tagis nested inside the <samp> tag, it represents that the input is responded back to the user by the system:

HTML <kbd> Tag Attributes

This element does not have any specific attributes although this element supports Global attributes and Event attributes.

Default CSS Settings for HTML <kbd> Tag

The default CSS Settings or value for <kbd> tag is as shown below:

kbd {
    font-family: monospace;


Browser Support for HTML5 <kbd> tag

Following browsers support this attribute:

  • Firefox 1+

  • Google Chrome 1+

  • Internet Explorer 2+

  • Apple Safari 1+

  • Opera 4+