HTML <var> tag

The <var> tag is used to define either mathematic or programming variable. The texts within the <var> element are italic style.

Type: Inline Element

Example of <var> tag

<var> x </var>

Supported Browsers

Tag Chrome Internet Explorer Firefox Safari Opera Mini
<var> Yes Yes Yes Yes Yes

Full code example

<!DOCTYPE html>
<html>
<head>
</head>
<body>
<p>
Linear momentum, <var> p=mv </var>
</p>
</body>
</html>
Run The code »

Output on the browser

Linear momentum, p=mv

More reference

<var> tag is a phrase tag. An HTML phrase tag is an inline tag that defines important meaning to the text rather than just changing appearance.

This tag helps in defining mathematic or programming variables; and parameters also. It must not use for styling purpose only. For styling only, use <span> tag.

<span style="font-style: italic;">
  Styling text
</span>

Default CSS property of <var> tag

var {
  font-style: italic;
}

Some related HTML phrase tags

Tag Note
<code> It defines computer code.
<em> It defines emphasized texts.
<kbd> It defines user input, such as keyboard input or, sometimes voice commands.
<samp> It defines an output from the system.
<strong> It defines strong texts.