var element represents a variable, being either a variable in a mathematical formula or computer code, a constant, a parameter in a function, etc.
For marking up variables inside a mathematical formula, the elements of MathML consitute a better alternative to
In our first example, we're making reference to a variable created in a program, along with a couple of parameters passed to the same function.
<p>The function generates a variable named <var>temp</var> and uses it to exchange the values in the parameters <var>param1</var> and <var>param2</var>.</p>
The function generates a variable named temp and uses it to exchange the values in the parameters param1 and param2.
Our second example shows a reference to a variable declared in a formula elsewhere in the document. This document's fragment is explaining its purpose in that formula.
<p>...where <var>a</var> represents the length of the hypotenuse, and <var>b</var> and <var>c</var> represent the lengths of the other two sides.</p>
...where a represents the length of the hypotenuse, and b and c represent the lengths of the other two sides.
Lastly, a sentence written in colloquial language makes reference to an undetermined number, calling it "n".
<p>If he has <var>n</var> soldiers, you should count at least with <var>n</var>+2 of your own.</p>
If he has n soldiers, you should count at least with n+2 of your own.
For information about global attributes refer to this list of global attributes in HTML5.
For information about global events refer to this list of global events in HTML5.