Menu
×
   ❮     
HTML CSS JAVASCRIPT SQL PYTHON JAVA PHP HOW TO W3.CSS C C++ C# BOOTSTRAP REACT MYSQL JQUERY EXCEL XML DJANGO NUMPY PANDAS NODEJS R TYPESCRIPT ANGULAR GIT POSTGRESQL MONGODB ASP AI GO KOTLIN SASS VUE DSA GEN AI SCIPY AWS CYBERSECURITY DATA SCIENCE
     ❯   

HTML <data> 标签


示例

以下示例显示产品名称,但也将每个名称与产品编号关联起来

<ul>
  <li><data value="21053">樱桃番茄</data></li>
  <li><data value="21054">牛肉番茄</data></li>
  <li><data value="21055">零食番茄</data></li>
</ul>
尝试一下 »

定义和用法

The <data> 标签用于添加给定内容的机器可读翻译。

此元素为数据处理器提供机器可读的值,并为在浏览器中呈现提供人类可读的值。

提示:如果内容与时间或日期相关,请使用 <time> 元素。


浏览器支持

元素
<data> 62.0 13.0 22.0 不支持 49.0

属性

属性 描述
value 机器可读格式 指定元素内容的机器可读翻译

全局属性

The <data> 标签还支持 HTML 中的全局属性


×

Contact Sales

If you want to use W3Schools services as an educational institution, team or enterprise, send us an e-mail:
[email protected]

Report Error

If you want to report an error, or if you want to make a suggestion, send us an e-mail:
[email protected]

W3Schools is optimized for learning and training. Examples might be simplified to improve reading and learning. Tutorials, references, and examples are constantly reviewed to avoid errors, but we cannot warrant full correctness of all content. While using W3Schools, you agree to have read and accepted our terms of use, cookie and privacy policy.

Copyright 1999-2024 by Refsnes Data. All Rights Reserved. W3Schools is Powered by W3.CSS.