var HTML

HTML <var> Tag

The HTML <var> tag is a phrase tag. It is used to specify a variable for a mathematical equation or a computer code. It displays the contents in the italic font.

HTML Phrase Tags:

Tag Uses
<em> To display an emphasized text.
<strong> To display an important text.
<dfn> To specify a definition term.
<code> To specify a piece of computer code.
<samp> To specify a sample output from a computer program.
<kbd> To specify a keyboard input.
<var> To specify a variable.

Example:

<!DOCTYPE html>
<html>
<body>
<p>Mathematical Equation:</p>
<p><var>x</var>(<var>y</var>-<var>z</var>) = <var>xy</var>-<var>xz</var></p>  
</body>
</html>

Explanation:

In the above example, we have used the HTML <var> tag to represent the variables of a mathematical equation.

Global Attributes:

All the Global attributes are supported by the HTML <var> tag.

Event Attributes:

All the Event attributes are supported by the HTML <var> tag.

Supporting Browsers:

Chrome, IE, Firefox, Opera, and Safari.