asp.net.ph

Skip Navigation LinksHome > Abakada: Back to Basics > Language References > HTML Elements > KBD Element

<kbd> Element


Renders text in a fixed-width font.HTML 2, 3.2, 4, 4.01, 5

HTML Syntax

NOTE: Both start and end tags are required.

Remarks

The <kbd> element displays text in a special font that is meant to indicate that the user should type the text on the keyboard.

The element is similar in function to the <code> and <samp> elements, that render text in the browser’s default fixed-width font.

kbd is used for inline formatting. For sections of code samples where block formatting is important, use the <pre> element to preserve the space characters and line breaks used in the code structure.

Attributes

The <kbd> element has no attribute of its own, but supports global attributes common to all HTML elements.

Example

The following shows how the kbd element may be used.

<p>This paragraph is rendered in the normal page font.
<p>This one shows <kbd>the effect of using the <b>kbd</b> element</kbd>.

which would render on a Web page as

This paragraph is rendered in the normal page font.

This one shows the effect of using the kbd element.

External References

See Also

CODE   PRE   SAMP   TT   XMP



Check out related books at Amazon

© 2025 Reynald Nuñez and asp.net.ph. All rights reserved.

If you have any question, comment or suggestion
about this site, please send us a note