View video tutorial

HTML <var> Tag


The <var> tag is used to defines a variable in computer programming.

HTML <var> Tag

The <var> element represents the name of a variable in a computer programming context or in a mathematical expression.

It usually renders the text in italics.

Global attributes

Global attributes may be applied on all elements, although some elements may have no effect on them.

<accesskey>, <class>, <contenteditable>, <contextmenu>, <data-*>, <dir>, <draggable>, <dropzone>, <hidden>, <id>, <lang>, <spellcheck>, <style>, <tabindex>, <title>, <translate>.

Learning with HTML Editor "Try it Now"

You can edit the HTML code and view the result using online editor.


<p>The volume of a rectangular object is <var>h</var> × <var>w</var> × <var>l</var>, where <var>h</var> represents the height,
    <var>w</var> the width and <var>l</var> the length of the box.</p>
Try it Now »

Click on the "Try it Now" button to see how it works.