HTML <var> tag
Definitie en gebruik
<var>
Labels worden gebruikt om variabelen in programmeer- of wiskundige expressies te definiëren. De inhoud binnen het label wordt meestal in schuin gedrukt weergegeven.
Tip:Dit label is niet verlaten. Echter, door CSS te gebruiken, kunnen rijkere effecten worden bereikt.
Zie ook:
Label | Beschrijving |
---|---|
<code> | Definieer variabelen. |
<samp> | Define example output of a computer program. |
<kbd> | Define keyboard input. |
<pre> | Define preformatted text. |
See also:
HTML tutorial:HTML text formatting
HTML DOM reference manual:Variable object
Example
Define some text as a variable in the document:
The area of the triangle is: 1/2 x <var>b</var> x <var>h</var>, where <var>b</var> is the base and <var>h</var> is the vertical height.
Global attributes
<var>
The tag also supports Global attributes in HTML.
event attributes
<var>
The tag also supports Event attributes in HTML.
Default CSS settings
Most browsers will display the following default values <var>
Element:
var { font-style: italic; }
Browser support
Chrome | Edge | Firefox | Safari | Opera |
---|---|---|---|---|
Chrome | Edge | Firefox | Safari | Opera |
Support | Support | Support | Support | Support |