目录 搜索
Attributes accesskey (attribute) class (attribute) contenteditable (attribute) contextmenu (attribute) data-* (attribute) dir (attribute) draggable (attribute) dropzone (attribute) Global attributes hidden (attribute) id (attribute) itemid (attribute) itemprop (attribute) itemref (attribute) itemscope (attribute) itemtype (attribute) lang (attribute) slot (attribute) spellcheck (attribute) style (attribute) tabindex (attribute) title (attribute) translate (attribute) Elements a abbr address area article aside audio b base bdi bdo blockquote body br button canvas caption cite code col colgroup data datalist dd del details dfn dialog div dl dt em embed fieldset figcaption figure footer form h1 head header hr html i iframe img input input type="button" input type="checkbox" input type="color" input type="date" input type="datetime"-local input type="email" input type="file" input type="hidden" input type="image" input type="month" input type="number" input type="password" input type="radio" input type="range" input type="reset" input type="search" input type="submit" input type="tel" input type="text" input type="time" input type="url" input type="week" ins kbd label legend li link main map mark menu menuitem meta meter nav noscript object ol optgroup option output p param picture pre progress q rp rt rtc ruby s samp script section select slot small source span strong style sub summary sup table tbody td template textarea tfoot th thead time title tr track u ul var video wbr Miscellaneous Attributes Block-level elements CORS enabled image CORS settings attributes Element Inline elements Kinds of HTML content Link types Microdata Optimizing your pages for speculative parsing Preloading content Reference Supported media formats Using the application cache Obsolete acronym applet basefont big blink center command content dir element font frame frameset hgroup image input type="datetime" isindex keygen listing marquee nextid noframes plaintext strike tt xmp
文字

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

内容类别

没有。

允许的内容

如果元素是<iframe> srcdoc,或者如果标题信息可从更高级别的协议获得,则元数据内容为零个或多个元素。否则,元数据内容的一个或多个元素,其中一个是<title>元素。

标记遗漏

如果head元素中的第一个元素是元素,则可以省略start标签。如果head元素之后的第一个元素不是空格字符或注释,则可以省略结束标签。

允许的父母

作为第一个孩子的一个<html>元素。

允许ARIA角色

没有

DOM界面

HTMLHeadElement

属性

该元素包含全局属性。

profileHTML 4only,inHTML5以空白符分隔的,一个或多个元数据档案的 URI。

示例

<html>  <head>    <title>Document title</title>  </head></html>

附注

如果在文档中忽略了 <head> 标签,则大部分浏览器会自动创建一个 <head> 元素。当然,有一些不会。

规范

规范

状态

评论

HTML标准该规范中'<head>'的定义。

水平

最新的shapshot没有变化

HTML5该规范中'<head>'的定义。

建议

已过时的配置文件

HTML 4.01规范该规范中'<head>'的定义。

建议


浏览器兼容性

Feature

Chrome

Edge

Firefox

Internet Explorer

Opera

Safari

Basic Support

1.0

(Yes)

1.0

(Yes)

(Yes)

(Yes)

profile

1.0

(Yes)

1.0

(Yes)

(Yes)

(Yes)

Feature

Android

Chrome for Android

Edge mobile

Firefox for Android

IE mobile

Opera Android

iOS Safari

Basic Support

(Yes)

(Yes)

(Yes)

1.0

(Yes)

(Yes)

(Yes)

profile

(Yes)

(Yes)

(Yes)

1.0

(Yes)

(Yes)

(Yes)

上一篇: 下一篇: