HTML <kbd> Tag
Learn HTML <kbd> Tags in this blog. The HTML <kbd> Tag refers to a piece of inline text that represents user keyboard input, voice input, or any other text entry device input.
The HTML <kbd> Tag renders in the default monospace font on the text browser. It is used when the document needs to display text that the user must enter exactly from its keyboard.
Example:-
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>
HTML kbd Tag
</title>
</head>
<body>
<h1>This is HTML kbd Tag Example</h1>
<p>Press <kbd>Ctrl</kbd> + <kbd>C</kbd> to copy text (Windows).</p>
<p>Press <kbd>Cmd</kbd> + <kbd>C</kbd> to copy text (Mac OS).</p>
</body>
</html>
Output:-
Tip: This tag is not disliked. However, it is possible to achieve a rich effect using CSS (see example below).
2 thoughts on “HTML Kbd Tag”