You are here: Reference > HTML > tags > kbd

kbd element

Browser support:
Indicates text to be entered by the user, usually text rendered in a monospaced font.
Contents are rendered in a fixed-width font. This element is not deprecated, but it is possible to get much richer text effects with CSS. Use the span element with the font style property instead.
If you want to see the HTML tags by categories, please visit this page.
This element requires a closing tag.
JavaScript page for this element: kbd.

Possible members:

Attributes
Events
Styles
Pseudos
accessKey
Sets an access key to an element.
cite
Sets the location of the source document.
class
Sets the style class or classes that belong to the element.
contentEditable
3
Sets whether the contents of the object are editable.
dateTime
Sets the timestamp when a deletion or insertion was made.
dir
Sets the text direction as related to the lang attribute.
DISABLED
Sets the state of an object for user interaction.
draggable
3.55
Sets whether an element is draggable.
HIDEFOCUS
Specifies whether a dotted rectangle (focus rectangle) is drawn around an object while it has focus.
id
Sets a unique identifier for the object.
lang
Specifies the language of the element.
language
Sets the scripting language for the current element. Use it only for the script element.
name
Sets the name of an element.
spellcheck
Sets whether the automatic spellchecker is enabled.
style
Sets an inline style associated with an element.
tabIndex
Specifies the tabbing order for keyboard navigation using the TAB key.
title
Specifies a tooltip for an element.
unSelectable
Sets whether the selection process can start in an element's content.
xml:lang
Sets the language code of the XML document.

Example HTML code 1:

This example illustrates the use of the kbd element:
<div style="background-color: #a0a0f0;">
    Variable-width font.<br />
    iiiii<br />
    wwwww<br />
</div>
<div style="background-color: #a0f0a0;">
    <kbd>
        Fixed-width font.<br />
        iiiii<br />
        wwwww<br />
    </kbd>
</div>
Did you find this example helpful? yes no

Related pages:

External links:

User Contributed Comments

Post Content

Post Content