HTML Computer Code Elements

element represents user input, like keyboard input or voice commands.

Text surrounded bykbdtags is typically displayed in the browsers default monospace font:

The HTMLsampelement represents output from a program or computing system.

Text surrounded bysamptags is typically displayed in the browsers default monospace font:

The HTMLcodeelement defines a fragment of computer code.

Text surrounded bycodetags is typically displayed in the browsers default monospace font:

Notice that thecodeelement does not preserve extra whitespace and line-breaks.

To fix this, you can put thecodeelement inside apreelement:

The HTMLvarelement defines a variable.

The variable could be a variable in a mathematical expression or a variable in programming context:

HTMLCSSJavaScriptPHPjQueryBootstrapandXML.

Your message has been sent to W3Schools.