<kbd>

  • Revision slug: HTML/Element/kbd
  • Revision title: kbd
  • Revision id: 81449
  • Created:
  • Creator: Jscher2000
  • Is current revision? No
  • Comment

Revision Content

HTML Keyboard Input Element

<kbd>...</kbd> - The HTML Keyboard Input Element produces an inline element displayed in the browser's default monotype font (Lucida Console). This element was intended to identify text for the user to type in, but commonly is used to style any text in a fixed width font.

Example

   Type the following in the Run dialog: <kbd>cmd</kbd><br />Then click the OK button.

Result

Type the following in the Run dialog: cmd
Then click the OK button.

Note

A CSS rule can be defined for the kbd selector to override the browser's default font face. Preferences set by the user might take precedence over the specified CSS.

See also

{{wiki.template('HTML:Element_Navigation')}}

Revision Source

<h2 name="HTML_Keyboard_Input_Element"> HTML <i>Keyboard Input</i> Element </h2>
<p><b>&lt;kbd&gt;...&lt;/kbd&gt;</b> - The HTML Keyboard Input Element produces an inline element displayed in the browser's default monotype font (Lucida Console). This element was intended to identify text for the user to type in, but commonly is used to style any text in a fixed width font.
</p>
<h3 name="Example"> Example </h3>
<pre class="eval">   Type the following in the Run dialog: &lt;kbd&gt;cmd&lt;/kbd&gt;&lt;br /&gt;Then click the OK button.
</pre>
<h4 name="Result"> Result </h4>
    <p>Type the following in the Run dialog: <kbd>cmd</kbd><br>Then click the OK button.</p>
<h3 name="Note"> Note </h3>
<p>A CSS rule can be defined for the <code>kbd</code> selector to override the browser's default font face. Preferences set by the user might take precedence over the specified CSS.
</p>
<h3 name="See_also"> See also </h3>
<ul><li> <a href="en/HTML/Element/code">HTML Code Element</a>
</li><li> HTML 4.01 Specification: <a class="external" href="http://www.w3.org/TR/html4/struct/text.html#h-9.2.1">Phrase Elements</a>
</li></ul>
<p>{{wiki.template('HTML:Element_Navigation')}}
</p>
Revert to this revision