HTML Tag Reference - HTML tag <var>








This <var> element usually causes text to be rendered in italics. It is used to format programming variable names that appear in a web page.

Browser compatibility

<var> Yes Yes Yes Yes Yes

What's new in HTML5

None.

Global Attributes

The <var> tag supports the Global Attributes in HTML.

Event Attributes

The <var> tag supports the Event Attributes in HTML.





Default CSS Settings

var { 
    font-style: italic;
}

Example

<html>
<body>
     <var>myField</var>
</body>
</html>

Click to view the demo