<VAR>NN all IE all HTML all  

<VAR>...</VAR>

HTML End Tag: Required  

The var element is one of a large group of elements that the HTML 4 recommendation calls phrase elements. Such elements assign structural meaning to a designated portion of the document. A var element is one that is used predominantly to display one or more inline characters representing a computer program variable name.

Browsers have free rein to determine how (or whether) to distinguish var element content from the rest of the body element. Both Navigator and Internet Explorer elect to render var element content in an italic font. Override the default with a style sheet as you see fit.

 
Example
 
<P>The value of <VAR>offsetWidth</VAR> becomes 20.</P>
 
Object Model Reference
 
[window.]document.getElementById(elementID)
 
Element-Specific Attributes

None.

 
Element-Specific Event Handler Attributes

None.

langNN 3 IE 4 HTML 4  

lang="languageCode"

Optional  

The language being used for the element's attribute values and content. A browser can use this information to assist in proper rendering of content with respect to details such as treatment of ligatures (when supported by a particular font or required by a written language), quotation marks, and hyphenation. Other applications and search engines might use this information to aid the selection of spell-checking dictionaries and the creation of indices.

 
Example
 
<SPAN lang="de">Deutsche Bundesbahn</SPAN>
 
Value

Case-insensitive language code.

 
Default

Browser default.

 
Object Model Reference
 
[window.]document.getElementById(elementID).lang