HTML var tag

HTML var element defines variable form of normal text. Equations normally use var element.

<p>Equation of line</p>
 <p>y = mx+b</p>
 <p><var>y</var> = <var>m</var> <var>x</var> + <var>b</var></p>
</>

Equation of line

y = mx+b

y = m x + b

Tag Uses

Specific uses of <var> tag
  • mathematical equations

  • programming syntax

  • constant in a program

Tag omission

Both opening and closing tags are necessary for the var element.

Global Attributes

All the global attributes are applicable on the var element.



Was this article helpful?