HTML contains several elements for defining user input and code.
The HTML <kbd>
element is used to define keyboard input. The content inside is displayed in the browser's default monospace font.
The example below shows how to define text as keyboard input in a HTML document.
The HTML <samp>
element is used to define sample output from a computer program. The content inside is displayed in the browser's default monospace font.
The example below shows how to define sample output from a computer program in a HTML document:
The HTMl <code>
element is used to define a piece of code. The content inside is displayed in the browser's default monospace font.
The example below shows how to define text as computer code in a HTML document: