<head>: The Document Metadata (Header) element
<head> HTML 元素包含有关文档的机器可读信息 (metadata),如 title、scripts 和 样式表。
¥The <head> HTML element contains machine-readable information (metadata) about the document, like its title, scripts, and style sheets.
注意:
<head>主要保存用于机器处理的信息,而不是人类可读的信息。对于人类可见的信息,例如顶层标题和列出的作者,请参阅<header>元素。¥Note:
<head>primarily holds information for machine processing, not human-readability. For human-visible information, like top-level headings and listed authors, see the<header>element.
属性
¥Attributes
该元素包括 全局属性。
¥This element includes the global attributes.
profileDeprecated-
一个或多个元数据配置文件的 URI,由 white space 分隔。
示例
技术总结
¥Technical summary
| 内容类别 | 没有任何。 |
|---|---|
| 允许的内容 |
如果文档是 否则,元数据内容的一个或多个元素,其中正好有一个是 |
| 标签遗漏 |
如果
<head> 元素中的第一个元素是元素,则可以省略开始标记。如果 <head> 元素后面的第一个元素不是空格字符或注释,则可以省略结束标记。
|
| 允许的父级 | <html> 元素,作为其第一个子元素。 |
| 隐式 ARIA 角色 | 没有对应的角色 |
| 允许的 ARIA 角色 | 不允许 role |
| DOM 接口 | HTMLHeadElement |
规范
| Specification |
|---|
| HTML Standard # the-head-element |
浏览器兼容性
BCD tables only load in the browser
也可以看看
¥See also
- 可以在
<head>内部使用的元素: