VOOZH about

URL: https://www.geeksforgeeks.org/html/html-kbd-tag/

⇱ HTML <kbd> Tag - GeeksforGeeks


  • Courses
  • Tutorials
  • Interview Prep

HTML <kbd> Tag

Last Updated : 28 May, 2026

The <kbd> tag in HTML is used to represent keyboard input or keyboard shortcuts. It displays text in a way that indicates the user should press a key or combination of keys.

  • <kbd> tag is used to show keyboard input in HTML.
  • It is commonly used for shortcut keys and commands.
  • Browsers usually display <kbd> text in a monospace font style.

Syntax:

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

List of all phrase tag:

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

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

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

Comment
Article Tags: