The var Tag
The `<var>` tag is used to specify a variable in a mathematical equation or a computer program. In most browsers, the content of this tag is displayed in italic format.
Syntax:
<var> Contents... </var>
Example: To demonstrate using the <var> tag in HTML that denotes variables and it is styled to differentiate them from regular text, providing emphasis on their significance within the content.
<!DOCTYPE html>
<html>
<head>
<title>var tag</title>
<style>
body {
text-align: center;
}
.geeks {
font-size: 25px;
font-weight: bold;
}
</style>
</head>
<body>
<div class="geeks"><var> Tag</div>
<var>w3wiki Variable</var>
</body>
</html>
Output:
HTML Computer Code Elements
The computer has a unique formatting and text style for displaying the messages related to codes. There are several elements available to mark up computer code elements using HTML which are as follows:
Table of Content
- The code Tag
- The kbd Tag
- The pre Tag
- The samp Tag
- The var Tag
- HTML Computer Code Elements
- Supported Browsers