HTML 属性:content
content 属性指定了 <meta> 元素的 name 属性所定义的元数据值的内容。它接受一个字符串作为其值,并且预期的语法取决于所使用的 name 值。
值
content 属性接受的值的类型取决于 name 的值。有关特定格式和类型的详细信息,请参阅 <meta> name 属性页面。
示例
设置文档的元描述
以下 <meta> 标签使用 name=description 来为文档设置“元描述”。content 属性提供了元数据的内容。
html
<meta
name="description"
content="The HTML reference describes all elements and attributes of HTML, including global attributes that apply to all elements." />
规范
| 规范 |
|---|
| HTML # attr-meta-content |
浏览器兼容性
加载中…
另见
<meta>name属性