<kbd>
HTML <kbd> (Keyboard Input) Tag
Example
<p>To copy the selected item press <kbd>Ctrl</kbd> + <kbd>C</kbd>.</p>
Meaning
The <kbd> inline element logically indicates text as keyboard input.
Version: HTML 2, 3.2, 4, 4.01, 5
Standard Syntax
<kbd>...</kbd>
Advertisement
Global Attributes
<kbd> element also supports the Global Attributes in HTML.
Event Attributes
<kbd> element also supports the Event Attributes in HTML.
More Examples
The following example show how to add style to <kbd> element:
Example
<style>
kbd.key {
border-radius: 3px;
padding: 1px 2px 0;
border: 1px solid black;
}
</style>
By Default CSS Value(s)
Most of the browsers will display the <kbd> element with the following by default value(s)
kbd {
font-family: monospace;
}
Related Tags:
<a>,<abbr>,<b>,<bdi>,<bdo>,<br>,<cite>,<code>,<data>,<dfn>,<em>,<i>,<mark>,<q>,<rp>,<rt>,<ruby>,<s>,<samp>,<small>,<span>,<strong>,<sub>,<sup>,<time>,<u>,<var> and<wbr>