Framify

Tag: <var>

<var> Syntax

Syntax Diagram for <var>
Opening Tag Content Closing Tag
<var> text </var>

<var> Description

The <var>. . . </var> tags define the text that occurs between them to be a variable. This tag is an example of "logical markup," as opposed to "physical markup." Logical markup defines what text is, rather than how it looks (as physical markup does). It is likely, though not guaranteed, that the "<var>" tags will cause text that occurs between them to be displayed in italic (similar to the physical markup "<i>").

The advantage to logical markup is that, regardless of how the affected text appears, it is always considered to be what the markup says it is. For example, a variable is always a variable, regardless of the font that any particular browser uses to represent it. The disadvantage to logical markup is that you cannot be sure how the text will appear (which may be important).

Conversely, the advantage to physical markup is that you can be sure of what the text will look like: when you want a typewriter font for a piece of text, you'll get typewriter font. The disadvantage to physical markup is that you may not be able to tell, just by looking at the font, what the text is supposed to represent (which may be important).

<var> Example

This markup: The syntax is:<br> <tt>print</tt> <var>filename</var> . . .causes the following to be displayed:
The syntax is:
print filename

Last Modified: