Easy Tutorial
❮ Tag Summary Att Script Charset ❯

HTML <var> Tag

Example

Formatting text in a document:

<var>Variable</var>

Browser Support

All major browsers support the <var> tag.


Tag Definition and Usage

The <var> tag is a phrase tag used to define a variable.

Tip: While we do not oppose the use of this tag, if you are using it just for visual effects, we recommend using CSS for potentially richer effects.

All phrase tags:

Tag Description
<em> Renders as emphasized text.
<strong> Defines important text.
<dfn> Defines a definition term.
<code> Defines a piece of computer code.
<samp> Defines sample output from a computer program.
<kbd> Defines keyboard input. It indicates text that should be entered by the user.
<var> Defines a variable. You can use this tag with <pre> and <code> tags.

Differences Between HTML 4.01 and HTML5

None.


Global Attributes

The <var> tag supports HTML's global attributes.


Event Attributes

The <var> tag supports HTML's event attributes.


Related Articles

HTML Tutorial: HTML Text Formatting

❮ Tag Summary Att Script Charset ❯