We're looking for a person or people to help audit MDN to find places we could speed up. Is this you or someone you know? Check out the RFP: https://mzl.la/2IHcMiE

<var> Redirect 1


The HTML Variable Element (<var>) represents a variable in a mathematical expression or a programming context.

Usage Context

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


This element only includes the global attributes.

DOM Interface

This element implements the HTMLElement interface.

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

Typical default style properties

var {
  font-style: italic; 


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

A simple equation: x = y + 2

Document Tags and Contributors

 Last updated by: Sheppy,