HTML <kbd> tag
The <kbd> tag is used to display text as keyboard text.
Standard attributes
class, dir, id, lang, style, title, xml:lang
For more information on standard attributes, check out our HTML standard attributes reference page.
Event attributes
onclick, ondblclick, onmousedown, onmousemove, onmouseout, onmouseover, onmouseup, onkeydown, onkeypress, onkeyup
For more information on event attributes, check out our HTML event attributes reference page.
Example
Here is some regular text
<kbd>Here is some keyboard text</kbd>
What are you typing again?
<kbd>Lots and lots of different characters. Yayyyyy!!!!</kbd>
Output:
Here is some regular text
Here is some keyboard text
What are you typing again?
Lots and lots of different characters. Yayyyyy!!!!