ទំព័រគំរូ:Var
Appearance
{{{1}}}
Usage
[កែប្រែ]This template is to help facilitate the displaying of variable names (in mathematics, computer source code, etc.) with the semantically correct <var>...</var>
, which also renders the variable in italics, as is customary. This method is preferred to simply italicizing, for accessibility, content/presentation separation, semantic Web, and metadata reasons; XHTML's <var>
element has semantic meaning, while simple italicization does not.
Example:
{{var|username}}
outputs
<var>username</var>
which renders as:
- username
compare to simple ''username''
italicization:
- username
See also
[កែប្រែ]- {{Varserif}} – same as {{var}} but uses serif font, especially for distinguishing between I (upper-case i) and l (lower-case L) as variables
- {{Wikivar}} – for displaying wikicode variables and magicwords as they would appear in source code, e.g. ទំព័រគំរូ:Wikivar, ទំព័រគំរូ:Wikivar