DEV Community

Cover image for HTML tags | kbd
Carlos Espada
Carlos Espada

Posted on • Edited on

2 1

HTML tags | kbd

It is used to represent the input of text by the user through a keyboard, by voice or using any other similar device.

It can be used in combination with the <samp> tag to represent various forms of text input and output:

  • Nest a <kbd> inside another <kbd>
<p>You can also create a new document using the keyboard shortcut <kbd><kbd>Ctrl</kbd> + <kbd>N</kbd></kbd>.</p>
Enter fullscreen mode Exit fullscreen mode
  • Nest a <kbd> inside a <samp>
<p>If a syntax error occurs, the tool will output the initial command you typed for your review:</p>
<blockquote>
  <samp><kbd>custom-git ad my-new-file.cpp</kbd></samp>
</blockquote>
Enter fullscreen mode Exit fullscreen mode
  • Nest a <samp> inside a <kbd>
<p>To create a new file, choose the menu option <kbd><kbd><samp>File</samp></kbd>⇒<kbd><samp>New Document</samp></kbd></kbd></p>
<p>Don't forget to click the <kbd><samp>OK</samp></kbd> button to confirm once you've entered the name of the new file.</p>
Enter fullscreen mode Exit fullscreen mode

Normally browsers render them using their default monospaced font, although you can customize the style using CSS.

  • Type: inline
  • Self-closing: No
  • Semantic value: No

Definition and example | Support

Sentry image

Hands-on debugging session: instrument, monitor, and fix

Join Lazar for a hands-on session where you’ll build it, break it, debug it, and fix it. You’ll set up Sentry, track errors, use Session Replay and Tracing, and leverage some good ol’ AI to find and fix issues fast.

RSVP here →

Top comments (0)

Sentry image

See why 4M developers consider Sentry, “not bad.”

Fixing code doesn’t have to be the worst part of your day. Learn how Sentry can help.

Learn more