HTML » Tags » var

Version: 2.0, 3.2, 4.0

Compability: Explorer 4, 5  Netscape 4, 6

Syntax:
<var> ... </var>

The <var> tag is used to signify that the designated word is a variable name in a listing of computer code. This tag is used inside code and pre tag elements. On most browsers, the word or text is rendered in an italic or oblique font style.

The closing tag is mandatory.
 

Examples

Code:
if (document.getElementById) <var>blnDOM</var> = true;
Output:
if (document.getElementById) blnDOM = true;
Language(s): HTML
Code:
<code>
if (document.getElementById) <var>blnDOM</var> = true;
</code>
Output:
if (document.getElementById) blnDOM = true;
Language(s): HTML

See Also: