description & Usage
<var> tag is used to represent variables and mathematical expressions.
Browsers use an italic font for the content inside this tag.
Here are some related tags to <var>:
tag | description |
---|---|
<code> |
Display computer code font-family: monospace |
<samp> |
Display computer code output font-family: monospace |
<kbd> |
Show keyboard buttons font-family: monospace |
<var> |
Display variable and mathematical expression font-style: italic |
<pre> |
Pre-formatted text font-family: monospace There are other default styles |
Browser compatibility and Support
# | Chrome | Edge | Firefox | Safari | Opera |
---|---|---|---|---|---|
<var> |
Global Attributes
The <var> tag supports the HTML Global Attributes.
Event Attributes
The <var> tag supports the HTML Event Attributes.
Default CSS
Most browsers will display the <var> tag with the following default style: