<var>
Example
<p>
The area is <i>w</i> times <i>h</i>.
</p><p>
The area is <var>w</var> times <var>h</var>.
</p><var> marks the letters as variables, not just italic text.
Common mistakes
- Using
<var>for any italic text. - Using
<var>for whole code snippets instead of<code>.
Interview questions
What is the difference between <var> and <code>?
<var> and <code>?<var> marks a variable name in prose or math, while <code> marks a fragment of computer code.
Should I use <var> or MathML?
<var> or MathML?Use <var> for variables in text and <math> for full equations.