<var>

  • Revision slug: HTML/Element/var
  • Revision title: var
  • Revision id: 1903
  • Created:
  • Creator: fscholz
  • Is current revision? No
  • Comment page created, 62 words added

Revision Content

The HTML <var> element represents a variable in a mathematical expression or a programming context.

Attributes

Common attributes only.

Typical default style properties

var {
  font-style: italic; 
}

Example

<p> A simple equation: <var>x</var> = <var>y</var> + 2 </p>

A simple equation: x = y + 2

Specification

{{ HTML:Element_Navigation() }}

{{ languages( { "de": "de/HTML/Element/var" } ) }}

Revision Source

<p>The HTML <code>&lt;var&gt;</code> element represents a variable in a mathematical expression or a programming context.</p>
<h3>Attributes</h3>
<p>Common attributes only.</p>
<h3>Typical default style properties</h3>
<pre>var {
  font-style: italic; 
}
</pre>
<h3>Example</h3>
<pre class="eval">&lt;p&gt; A simple equation: &lt;var&gt;x&lt;/var&gt; = &lt;var&gt;y&lt;/var&gt; + 2 &lt;/p&gt;
</pre>
<p>A simple equation: <var>x</var> = <var>y</var> + 2</p>
<h3>Specification</h3>
<ul> <li><a class=" external" href="http://www.w3.org/TR/html401/struct/text.html#edef-VAR">HTML 4.01 var</a></li> <li><a class=" external" href="http://dev.w3.org/html5/markup/var.html">HTML5 var</a></li>
</ul>
<p>{{ HTML:Element_Navigation() }}</p>
<p>{{ languages( { "de": "de/HTML/Element/var" } ) }}</p>
Revert to this revision