html The var tag is a phrase tag used to define variables. We have nothing against the use of this tag, but if you are using it just to achieve a certain visual effect, we recommend that you use CSS, which may achieve a richer effect.
#html How to use var tag?
Tag definition and usage instructions
tag is a phrase tag used to define variables.
Tip: We do not object to the use of this tag, but if you are only using this tag to achieve a certain visual effect, we recommend that you use CSS, which may achieve a richer effect.
All phrase tags:
are rendered as highlighted text.
Defines important text.
Define a definition item.
Defines computer code text.
Defines sample text.
Define keyboard text. It indicates that the text was typed from the keyboard. It is often used in computer-related documentation or manuals.
Define variables. You can use this tag with the and <code> tags. </code>
Differences between HTML 4.01 and HTML5
None.
Global attributes
tag supports HTML global attributes.
Event attributes
tag supports HTML event attributes.
Example
Format text in the document:
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title></title> </head> <body> <em>强调文本</em><br> <strong>加粗文本</strong><br> <dfn>定义项目</dfn><br> <code>一段电脑代码</code><br> <samp>计算机样本</samp><br> <kbd>键盘输入</kbd><br> <var>变量</var> </body> </html>
Effect output:
The above is the detailed content of How to use html var tag. For more information, please follow other related articles on the PHP Chinese website!