Skip to content
Related Articles

Related Articles

HTML <kbd> Tag

View Discussion
Improve Article
Save Article
  • Difficulty Level : Basic
  • Last Updated : 19 Jul, 2022

It is a phrase tag and used to define the keyboard input. The text enclosed within <kbd> tag is typically display in the browser’s default monospace font.


<kbd> text content ... </kbd>

List of all phrase tag: 

  • <em>: It is used to emphasize the text.
  • <strong>: It is used to define an important text.
  • <code>: It encloses the computer code.
  • <samp>: It defines a sample output text from a computer program.
  • <kbd>: It defines the text of keyboard input.
  • <var>: It defines the variable text.

Example 1: This example describe the use of <kbd> tag.


<!DOCTYPE html>
    <h3>HTML kbd Tag</h3>
        Open a new window using the
        keyboard shortcut
        <kbd>Ctrl</kbd> + <kbd>N</kbd>


Example 2: This example using <kbd> tag with some CSS styles.


<!DOCTYPE html>
        kbd {
            border-radius: 2px;
            padding: 2px;
            border: 1px solid black;
    <h2>HTML kbd Tag</h2>
<p>Open a new window using the
        keyboard shortcut


Supported Browsers: 

  • Google Chrome
  • Edge 12 and above
  • Internet Explorer
  • Firefox 1 and above
  • Safari
  • Opera

My Personal Notes arrow_drop_up
Recommended Articles
Page :

Start Your Coding Journey Now!