<var> represents a variable name in mathematics or programming. It normally appears italic, though CSS and browser settings can change that presentation.
A simple formula
The variables are marked individually. The explanation defines what each one means.
HTML and CSS
HTML
<p>Rectangle area: <var>A</var> = <var>w</var> × <var>h</var>.</p>
<p>
<var>w</var> is width and <var>h</var> is height, measured in the same unit.
</p>
CSS
var {
font-style: italic;
}
Edit HTML or CSS to update the preview as you type. Copy code snippet copies the selected tab. Preview spacing and font defaults are not included.
Content and alternatives
Var accepts phrasing content and global attributes. It does not calculate a value or attach a programming variable to the page. Use code for source code, kbd for input, and samp for sample output.
A plain HTML formula may need additional spoken explanation. Consider MathML for notation with complex structure rather than constructing it entirely from spans and baseline shifts.
Try a change
Set var { font-style: normal; }. The variable meaning remains even when the italic appearance disappears. For decorative italics with no variable meaning, use font-style on a suitable element.
Sources and browser support
MDN: var describes the syntax and links to the specification and compatibility data. Check individual values in that table when supporting older browsers.