我們的志工尚未將此文章翻譯為 正體中文 (繁體) 版本。加入我們,幫忙翻譯!
Summary
The HTML <data>
Element links a given content with a machine-readable translation. If the content is time- or date-related, the <time>
must be used.
Content categories | Flow content, phrasing content, palpable content. |
---|---|
Permitted content | Phrasing content. |
Tag omission | None, both the starting and ending tag are mandatory. |
Permitted parent elements | Any element that accepts phrasing content. |
DOM interface | HTMLDataElement |
Attributes
This element includes the global attributes.
value
- This attribute specifies the machine-readable translation of the content of the element.
Example
The following example displays product names but also associates each name with its UPC code.
<p>New Products</p> <ul> <li><data value="3967381398">Mini Ketchup</data></li> <li><data value="3967381399">Jumbo Ketchup</data></li> <li><data value="3967381400">Mega Jumbo Ketchup</data></li> </ul>
Specifications
Specification | Status | Comment |
---|---|---|
WHATWG HTML Living Standard The definition of '<data>' in that specification. |
Living Standard | No change from HTML5 |
HTML5 The definition of '<data>' in that specification. |
Recommendation | Initial definition. |
Browser compatibility
Feature | Chrome | Firefox (Gecko) | Internet Explorer | Opera | Safari |
---|---|---|---|---|---|
Basic support | Not supported | 22.0 (22.0) bug 839371 | Not supported | Not supported | Not supported |
Feature | Android | Firefox Mobile (Gecko) | IE Mobile | Opera Mobile | Safari Mobile |
---|---|---|---|---|---|
Basic support | Not supported | Not supported | Not supported | Not supported | Not supported |
See also
- The HTML
<time>
element.
文件標籤與貢獻者
標籤:
此頁面的貢獻者:
Sebastianz,
Jeremie,
kscarfone,
teoli,
bronzehedwick,
tregagnon,
Sheppy,
Nickolay,
trevorh,
medicdude,
ethertank,
leegee,
rblancarte
最近更新:
Sebastianz,