Tutorialspoint.dev

HTML | <var> Tag

It is a phrase tag and used to specify the variable in mathematical equation or in computer program. The content of this tag are displayed in italic format in most of the browsers.

Syntax:

<var> Contents... </var>

Example:

<!DOCTYPE html>
<html>
    <head>
        <title>var tag</title>
    </head>
    <style>
        body {
            text-align:center;
        }
        .gfg {
            font-size:40px;
            font-weight:bold;
            color:green;
        }
        .geeks {
            font-size:25px;
            font-weight:bold;
        }
    </style>
    <body>
        <div class ="gfg">GeeksForGeeks</div>
        <div class = "geeks"><var> Tag</div>
        <var>GeeksforGeeks Variable</var>
    </body>
</html>                    

Output:

Supported Browsers: The browser supported by <var> tag are listed below:

  • Apple Safari
  • Google Chrome
  • Firefox
  • Opera
  • Internet Explorer


This article is attributed to GeeksforGeeks.org

leave a comment

code

0 Comments

load comments

Subscribe to Our Newsletter