HTML Computer Code Elements
HTML contains several elements for defining user input and computer code. The content inside these elements is displayed in the browser's default monospace font.
Code is inlined in a <code> elements, whereas blocks of code are placed in <pre> elements.
The HTML <kbd> element is used to define keyboard input. The content inside is displayed in the browser's default monospace font. Example:
<p>Save the document by pressing <kbd>Ctrl + S</kbd></p>
The HTML <samp> element is used to define sample output from a computer program. Example:
<p>Message from my computer:</p> <p><samp>File not found.<br>Press F1 to continue</samp></p>