asp.net.ph

Skip Navigation LinksHome > Abakada: Back to Basics > Language References > HTML Elements > VAR Element

<var> Element


Denotes a variable.HTML 2, 3.2, 4, 4.01, 5

HTML Syntax

NOTE: Both start and end tags are required.

Remarks

The <var> element represents the name of a variable.

This could be an actual variable in a mathematical expression or programming context, an identifier representing a constant, a symbol identifying a physical quantity, a function parameter, or just be a term used as a placeholder in prose.

Browsers normally display <var> elements in a fixed-width italic font, but authors can override this using CSS.

Attributes

The <var> element has no attribute of its own, but supports global attributes common to all HTML elements.

Example

The following shows how the var element may be used.

Shipping fee is based on calculated package size ( <var>l</var> × <var>w</var> × <var>h</var> ), 
   where <var>l</var> represents the length, <var>w</var> the width and 
   <var>h</var> the height of the package.

And when applied a style using CSS:

var { font-weight: bold }

would render on a Web page as

Shipping fee is based on calculated package size ( l × w × h ), where l represents the length, w the width and h the height of the package.

External References

See Also

CODE   KBD   SAMP


Need a break ?
Suggested Reading

Check out related books at Amazon

© 2025 Reynald Nuñez and asp.net.ph.

If you have any question, comment or suggestion,
please send us a note