Please note, this is a STATIC archive of website developer.mozilla.org from November 2016, cach3.com does not collect or store any user information, there is no "phishing" involved.

我們的志工尚未將此文章翻譯為 正體中文 (繁體) 版本。加入我們,幫忙翻譯!

Summary

The HTML Variable Element (<var>) represents a variable in a mathematical expression or a programming context.

Usage Context

Permitted content Phrasing content
Tag omission Both start and end tags are required
Permitted parent elements Any element that accepts phrasing content.
Normative document HTML, "The var element"

Attributes

This element only includes the global attributes.

DOM Interface

This element implements the HTMLElement interface.

Implementation Note: up to Gecko 1.9.2 inclusive, Firefox implements the HTMLSpanElement interface for this element.

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

文件標籤與貢獻者

 此頁面的貢獻者: kscarfone, Sheppy, medicdude, ethertank, teoli, fscholz, hobophobe, Ms2ger
 最近更新: accroccigarette01,