From 33058f2b292b3a581333bdfb21b8f671898c5060 Mon Sep 17 00:00:00 2001 From: Peter Bengtsson Date: Tue, 8 Dec 2020 14:40:17 -0500 Subject: initial commit --- files/zh-cn/web/html/element/head/index.html | 92 ++++++++++++++++++++++++++++ 1 file changed, 92 insertions(+) create mode 100644 files/zh-cn/web/html/element/head/index.html (limited to 'files/zh-cn/web/html/element/head') diff --git a/files/zh-cn/web/html/element/head/index.html b/files/zh-cn/web/html/element/head/index.html new file mode 100644 index 0000000000..338521df1f --- /dev/null +++ b/files/zh-cn/web/html/element/head/index.html @@ -0,0 +1,92 @@ +--- +title: +slug: Web/HTML/Element/head +tags: + - HTML + - HTML 文档元数据 + - Web + - head + - 元素 + - 参考 +translation_of: Web/HTML/Element/head +--- +

概述

+ +

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

+ + + +

属性

+ +

该元素包含全局属性

+ +
+
{{htmlattrdef("profile")}}  {{HTMLVersionInline(4)}} only, {{obsolete_inline}} in {{HTMLVersionInline(5)}}
+
一个由空格分隔的 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。

+ +

规范

+ + + + + + + + + + + + + + + + + + + + + + + + + + +
SpecificationStatusComment
{{SpecName('HTML WHATWG', 'semantics.html#the-head-element', '<head>')}}{{Spec2('HTML WHATWG')}}自上一次快照后未改变
{{SpecName('HTML5 W3C', 'document-metadata.html#the-head-element', '<head>')}}{{Spec2('HTML5 W3C')}}废弃 profile
{{SpecName('HTML4.01', 'struct/global.html#h-7.4.1', '<head>')}}{{Spec2('HTML4.01')}} 
+ +

浏览器兼容性

+ +

{{Compat("html.elements.head")}}

+ +

相关链接

+ + + +
{{HTMLRef}}
-- cgit v1.2.3-54-g00ecf