HTML <var> Tag
Browser Support
![]()
![]()
![]()
![]()
![]()
All major browsers support the <var> tag
Tag Definition and Usage Instructions
The <var> tag is a phrase tag used to define a variable.
Tip:We do not object to using this tag, but if you use it only for a certain visual effect, we recommend using CSS, which may achieve richer effects.
All phrase tags:
| Tag | Description |
|---|---|
| <em> | Rendered as emphasized text. |
| <strong> | Defines important text. |
| <dfn> | Defines a definition item. |
| <code> | Defines computer code text. |
| <samp> | Defines sample text. |
| <kbd> | Defines keyboard text. It indicates that the text is typed from the keyboard. It is often used in computer-related documentation or manuals. |
| <var> | Defines a variable. You can use this tag together with the <pre> and <code> tags. |
Differences between HTML 4.01 and HTML5
None.
Global Attributes
The <var> tag supportsHTML Global Attributes。
Event Attributes
The <var> tag supportsHTML Event Attributes。
Related Articles
HTML Tutorial:HTML Text Formatting
Other Extensions