HTML <var> Tag
Description
The <var>
HTML element is used for indicating an instance of a variable or a parameter for an application. The variable could be part of an application, mathematical expression, or a placeholder in prose. It's typically presented using an italicized version of the current typeface, although that behaviour is browser-dependent.
Properties
- Permitted Parents
- Any element that accepts phrasing content
- Content
- Inline and text
- Start/End Tags
- Start tag: required, End tag: required
Example
You need to add the <var>width</var> and <var>height</var> to the program.
Attributes
None
Global Attributes
The <var>
tag also supports the Global Attributes in HTML5
Event Attributes
The <var>
tag also supports the Event Attributes in HTML5
Browser Support
The following table will show you the current browser support for the HTML <var>
tag.
Desktop | |||||
12 | 1 | 1 | 15 | 4 |
Tablets / Mobile | |||||
18 | 4 | 14 | 3.2 | 1 | 4.4 |
Last updated by CSSPortal on: 30th September 2023