The variable element
The <var>
tag represents the name of a variable in a mathematical equation or computer program. As you probably remember from math classes, variables are symbols used in formulas as placeholders for quantities that change depending on the context. For example, the formula P = a + b + c used to calculate the perimeter of a triangle contains variables a, b, and c as placeholders for the triangle's sides' length and P as their sum.
As with other formatting tags, the <var>
tag's purpose is not to style the content — although it's certainly a part of it — but to code it semantically. This means that what's inside the tag is logically different from the surrounding content and helps with search optimization.