HTML: The Markup Language Reference

varvariable or placeholder text # T

The var element represents either a variable in a mathematical expression or programming context, or placeholder text that the reader is meant to mentally replace with some other literal value.

Permitted contents #

Permitted attributes #

global attributes
Any attributes permitted globally.

Tag omission #

A var element must have both a start tag and an end tag.

Permitted parent elements #

any element that can contain phrasing elements

DOM interface #

Uses HTMLElement.

Typical default display properties #

var {
font-style: italic; }