概述

HTML head 元素 规定文档相关的配置信息(元数据),包括文档的标题,引用的文档样式和脚本等。

属性

该元素包含全局属性

profile  HTML 4 only, in HTML5
一个由空格分隔的 URL 列表,这些 URL 包含着有关页面的配置信息。

示例

<html>
  <head>
    <title>文档标题</title>
  </head>
</html>

附注

如果在文档中忽略了 <head> 标签,则大部分浏览器会自动创建一个 <head> 元素。当然,有一些不会
下面这些浏览器经测试不会自动创建一个 head 元素:Android <=1.6, iPhone <=3.1.3, Nokia 90, Opera <=9.27, and Safari <=3.2.1。

规范

Specification Status Comment
HTML Living Standard
<head>
Living Standard 自上一次快照后未改变
HTML5
<head>
Recommendation 废弃 profile
HTML 4.01 Specification
<head>
Recommendation  

浏览器兼容性

Update compatibility data on GitHub
DesktopMobile
ChromeEdgeFirefoxInternet ExplorerOperaSafariAndroid webviewChrome for AndroidEdge MobileFirefox for AndroidOpera for AndroidiOS SafariSamsung Internet
Basic supportChrome Full support 1Edge Full support YesFirefox Full support 1IE Full support YesOpera Full support YesSafari Full support YesWebView Android Full support YesChrome Android Full support YesEdge Mobile Full support YesFirefox Android Full support 4Opera Android Full support YesSafari iOS Full support YesSamsung Internet Android Full support Yes
profile
DeprecatedNon-standard
Chrome Full support 1Edge Full support YesFirefox Full support 1IE Full support YesOpera Full support YesSafari Full support YesWebView Android Full support YesChrome Android Full support YesEdge Mobile Full support YesFirefox Android Full support 4Opera Android Full support YesSafari iOS Full support YesSamsung Internet Android Full support Yes

Legend

Full support  
Full support
Non-standard. Expect poor cross-browser support.
Non-standard. Expect poor cross-browser support.
Deprecated. Not for use in new websites.
Deprecated. Not for use in new websites.

相关链接

文档标签和贡献者

此页面的贡献者: eforegist, jesse0x90, AlexChao
最后编辑者: eforegist,