The var tag

The var tag is used to highlight variables of computer programs within the text of your HTML page.

By default, the contents of var are italicized, this behavior can be changed using the CSS property font-style.

Example

Let's see how the var tag works:

htmlWe introduce a variable <var>$a</var>, equal to three.

Результат:

See also

  • tag code,
    in which it is customary to enclose program code
  • tag samp,
    intended for the result of programs