pre tag
em tag
i tag
kbd tag
samp tag
tt tag
TAG: var
<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 separate closing tag is mandatory.
Attributes and Events
class
dir
id
lang
onclick
ondblclick
onkeydown
onkeypress
onkeyup
onmousedown
onmousemove
onmouseout
onmouseover
onmouseup
style
title
Code:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "DTD/xhtml-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="eng">
<head>
<title>DevGuru XHTML var Tag Example</title>
</head>
<body>
<pre>
if (document.getElementById) <
var
>blnDOM<
>/var
> = true;
</pre>
</body>
</html>
Output:
if (document.getElementById)
blnDOM
= true;
Or:
Code:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "DTD/xhtml-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="eng">
<head>
<title>DevGuru XHTML var Tag Example</title>
</head>
<body>
<code>
if (document.getElementById) <
var
>blnDOM<
/var
> = true;
</code>
</body>
</html>
Output:
if (document.getElementById)
blnDOM
= true;
Copyright 1999-2001 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information