HTML <var> (Variable) Tag

❮ Previous Reference Next ❯

Example

<p>A simple equation: <var>z</var> = <var>x</var> + <var>y</var></p>

Meaning

The <var> element is used to indicate a variable (an identifier that occurs in a programming language or a mathematical expression), with any enclosed text generally rendered in italics.

The <var> element is a perfect candidate for style sheet binding.

Also look at: <code>, <samp>, <kbd> and <pre>

Version: HTML 2, 3.2, 4, 4.01, 5


Standard Syntax

<var>...</var>

Browser Support

Status







Global Attributes

The <var> element also supports the Global Attributes in HTML.


Event Attributes

The <var> element also supports the Event Attributes in HTML.


By Default CSS Value(s)

Most of the browsers will display the <var> element with the following by default value(s)

var { 
  font-style: italic;
}
❮ Previous Reference Next ❯