HTML variable - how to use <var> tag

The HTML <var> tag is a phrase tag used to define a variable.


The var tag supports the global and event attributes.


<body> <p>computer variable<br /> <var>var i = 0;</var> </p> </body>

Related HTML tags:

  • <code> - used to display computer code
  • <samp> - used to display sample output from a computer program
  • <kbd> - used to display keyboard input