HTML var Tag: Main Tips
- By using the
vartag, you can mark HTML variables in the context of programming or maths.
- The exact display depends on the browser. In most cases, the symbols appear in italicized font.
varHTML tag supports all global attributes.
Theory is great, but we recommend digging deeper!
Using var in HTML
<var> tag represents HTML variables in the text. You must include both starting and ending tags:
<p>Einstein's best known equation goes like this: <var>E</var> = <var>mc</var><sup>2</sup></p>