HTML kbd tag

<Kbd> tag is for keyboard input. Actually it was made for the user input or keyboard input style. The font family of kbd input is monospace.

Example


<p>To get the result Press <kbd> <kbd>Ctrl</kbd> + <kbd>r</kbd> </kbd></p>
 <p><kbd> This input looks as it has been echoed by the system. </kbd></p>
Try </>

Specific uses

kbd element may also be nested another kbd element to represent input key.

Example

<p> To copy the text just select by pressing <kbd> <kbd>Ctrl</kbd> + <kbd>a</kbd> </kbd>. <p>
<p> And then press <kbd> <kbd>Ctrl</kbd> + <kbd>c</kbd> </kbd>. </p>

Try</>

Kbd element may also be used in combination with samp to represent system input or a file name.

Example

<p>To access the downloaded videos go to download <kbd><samp>Floder</samp></kbd> and then open videos <kbd><samp>Floder</samp></kbd>. </p>

Try</>

Related tags

TagsDescription
<samp> html samp element represents system output.
<p>Press <samp> <kbd>Ctrl</kbd> + <kbd>c</kbd> </samp> to copy</p>

Tag omission

Both the opening and closing tags are necessary for the kbd element.

Global Attributes

All the global attributes are applicable on the kbd element.



Was this article helpful?

 

Email:

Message:

Get the newsletter