123 of 133 menu

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:

We 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
byenru