HTML - tags - k....

revision:


"kbd" tag : used to define keyboard input

The <kbd> tag is used to define keyboard input. The content inside is displayed in the browser's default monospace font.
This tag is not deprecated. However, it is possible to achieve richer effect by using CSS.

The "kbd" element indicates text that should be typed on a keyboard. This is a fantastic, and underused, element that can be really helpful if you have to write any sort of user documentation. Part of the reason that the "kbd" element is underused is that the default style is simply a monospace font, which makes it indistinguishable from a "code" element. But with a little bit of styling, make "kbd" elements can be made much more helpful and communicative.

Attributes: the <kbd> element supports the global attributes and events attributes.

Syntax : <kbd> . . . </kbd>

some examples

example

Press Ctrl + C to copy text (Windows).

Press Cmd + C to copy text (Mac OS).

Codes:

                    <p class="spec">Press <kbd>Ctrl</kbd> + <kbd>C</kbd> to copy text (Windows).</p>
                    <p class="spec">Press <kbd>Cmd</kbd> + <kbd>C</kbd> to copy text (Mac OS).</p>
                

example

Three keys you really need to familiarize yourself with are CTRL, ALT and DEL.

Codes:

                    <style>
                        .one kbd { border: 1px solid #666666; border-radius: 4px; padding: 3px 5px; margin: 2px;
                            color: #444444; text-decoration: none; }
                    </style>
                    <div>
                        <p class="spec one">Three keys you really need to familiarize yourself with are <kbd>CTRL</kbd>,
                        <kbd>ALT</kbd> and <kbd>DEL</kbd>.</p>
                    </div>