HTML 18 💻 code, var, kbd, samp and pre elements
<p>Here is some <code>HTML</code> code:</p> <p>2 + <var>x</var> = <math>2 + x</math></p> <p>To save your progress, press <kbd>Ctrl + S</kbd></p> <samp>The quick brown fox jumps over the lazy dog.</samp> <pre> <code> // this is Javascript function add(x, y) { return x + y; } </code> </pre>
pre element defines a preformatted text, often used for code.
code element indicates that its content should be treated as code
var element is used to define variable in mathematical equation or programming expression
kbd element indicates a keyboard input.
samp element represents a sample text from a larget text or an article