<var>

Resumo

O elemento HTML Variable (<var>) representa uma variável em uma expressão matemática ou um contexto de programação.

Contexto de utilização

Permitted content Phrasing content
Tag omission Both start and end tags are required
Permitted parent elements Any element that accepts phrasing content (en-US).
Normative document HTML, "The var element"

Atributos

Este elemento somente inclui os global attributes (en-US).

Interface DOM

Este elemento implementa a interface HTMLElement (en-US).

Note: Implementation note: up to Gecko 1.9.2 inclusive, Firefox implements the HTMLSpanElement interface for this element.

Propriedades típicas padrão de estilo

css
var {
  font-style: italic;
}

Exemplo

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

A simple equation: x = y + 2