The <var>
represents a variable in a mathematical expression or a programming context.
Content categories | Flow content, phrasing content, palpable content. |
---|---|
Permitted content | Phrasing content |
Tag omission | Both start and end tags are required |
Permitted parents | Any element that accepts phrasing content. |
Permitted ARIA roles | Any |
DOM Interface | HTMLElement |
This element only includes the global attributes.
var { font-style: italic; }
<p> A simple equation: <var>x</var> = <var>y</var> + 2 </p>
A simple equation: x = y + 2
Specification | Status | Comment |
---|---|---|
HTML Living Standard The definition of '<var>' in that specification. | Living Standard | |
HTML5 The definition of '<var>' in that specification. | Recommendation |
Feature | Chrome | Edge | Firefox | Internet Explorer | Opera | Safari |
---|---|---|---|---|---|---|
Basic support | Yes | Yes | 1 | Yes | Yes | Yes |
Feature | Android webview | Chrome for Android | Edge mobile | Firefox for Android | Opera Android | iOS Safari | Samsung Internet |
---|---|---|---|---|---|---|---|
Basic support | Yes | Yes | Yes | 4 | Yes | Yes | ? |
© 2005–2018 Mozilla Developer Network and individual contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/HTML/Element/var