English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
The <var> tag represents the name of a variable or a value provided by the user.
Using var in mathematical equations demonstrated:
!doctype html <html> <head> <meta charset="UTF-8"> <title>HTML var tag usage (Basic Tutorial Website oldtoolbag.com)</title> </head> <body> <p> A simple equation: <var>x</var> = <var>y</var> + 2 </p> </body> </html>Test and see ‹/›
IEFirefoxOperaChromeSafari
All mainstream browsers support the <var> tag
The <var> tag is a phrase tag used to define variables.
Tip: We are not against using this tag, but if you use it only to achieve a certain visual effect, we recommend using CSS, which may produce richer effects.
All Phrase Tags:
Tag | Description |
---|---|
<em> | Presented as emphasized text. |
<strong> | Define important text. |
<dfn> | Define a definition item. |
<code> | Define computer code text. |
<samp> | Define sample text. |
<kbd> | Define keyboard text. It indicates that the text is typed from the keyboard. It is often used in documents or manuals related to computers. |
<var> | Define Variables. You can use this tag in conjunction with <pre> and <code> tags. |
None.
Support for <var> tag Global Attributes of HTML.
Support for <var> tag HTML Event Attributes.
HTML Tutorial:HTML Text Formatting