HTML Tags Web development basics

HTML computer code elements

HTML computer code elements refer to a fragment of computer code.

For example:

var y=66;

Various HTML computer code elements are:

<kbd> element for keyboard input

HTML <kbd> defines a keyboard input.

For example:

file open
file close

HTML <samp> element

<samp> defines a sample output of a computer program.
For example: login: Apr 12 09:10:17
Linux 2.6.10-grsec+gg3+e+fhs6b+nfs+gr0501+++p3+c4a+gr2b-reslog-v6.189

<code> element

The <code> element defines a piece of computer programming code.
For example:

var x=5;
var y=6;
var z=x+y;

HTML <var> element

The HTML element defines a variable.

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

For Example:

Einstein wrote: E = mc2.