Continue

 Programming Variables

This element is usually used in conjunction with the <pre> and <code> elements to indicate that the content of that element is a variable.

Example

<!DOCTYPE html>

<html>

<head>

<title>Variable Text Example</title>

</head>

<body>

<p><code>document.write("<var>user-name</var>")</code></p>

</body>

</html>


This will produce the following result:

document.write("user-name")

Comments

Popular Posts