1. Computing & Technology

Discuss in my forum

<var></var>

By , About.com Guide

VAR Description:

The VAR tag defines the enclosed text as a variable or user supplied information. It is most often used in representations of computer code.

The VAR tag is a semantic tag that gives the enclosed text a specific meaning for the computer. These types of tags are used more for style and to markup your text more meaningfully than for layout or design.

VAR Web Browser Support:

HTML Versions

VAR Attributes:

VAR End Tag:

</var> REQUIRED

VAR Contents:

CDATA Usually text. The following tags are valid within the VAR tag:
a, abbr, acronym, applet, b, basefont, bdo, big, br, button, cite, code, dfn, em, font, i, iframe, img, input, kbd, label, map, object, q, s, samp, script, select, small, span, strike, strong, sub, sup, tt, u, var

VAR Valid Context:

The VAR tag is valid within the following tags:
a, abbr, acronym, address, applet, b, bdo, big, blockquote, body, button, caption, center, cite, code, dd, del, dfn, div, dt, em, fieldset, font, form, h1, h2, h3, h4, h5, h6, i, iframe, ins, kbd, label, legend, li, noframes, noscript, object, p, q, s, samp, small, span, strike, strong, sub, sup, td, th, tt, u, var

VAR Usage:

variable text

To copy a file type <code>COPY <var>filename</var></code>

VAR Special Notes:

  • Most browsers usually render the VAR tag as italics text. If you need your text to be rendered in italics, but it is not a variable use the font-style style property.
  • You don’t have to enclose the VAR tag inside the CODE tag, but that is a common usage.

More VAR Information:

Related HTML Tags

©2012 About.com. All rights reserved.

A part of The New York Times Company.