Variable Element Tutorial

<var>

Introductory Text

The var element represents a variable: mathematical or programming contexts; or, a placeholder in prose (as noted in HTML 5).

Start tag:
<var>
End tag:
</var>

Use Examples

Example [Basic (HTML 2.0)]:

Type html-check file | more to check file for markup errors.

Code [HTML]:

<p>Type <SAMP>html-check <VAR>file</VAR> | more</SAMP> to check »
<VAR>file</VAR> for markup errors.</p>


Example [Basic (HTML 5)]:

Whenever a particle A exerts a force on another particle B, B simultaneously exerts a force on A with the same magnitude in the opposite direction. — Sir Isaac Newton

Code [HTML]:

<p>Whenever a particle <var>A</var> exerts a force on another particle »
<var>B</var>, <var>B</var> simultaneously exerts a force on »
<var>A</var> with the same magnitude in the opposite direction. »
— <cite>Sir Isaac Newton</cite></p>


Content Model/Assigned Attributes

Element-Type:
Text-Level [HTML 4.01]
Phrasing Content [HTML 5]
Attributes:

</var>