title

<title>

HTML<title>元素定义文档的标题,显示在浏览器的标题栏或标签页上。它只可以包含文本,若是包含有标签,则包含的任何标签都不会被解释。

内容类别
允许的内容不是元素间空白的文本
标记遗漏打开和关闭标签都是必需的。请注意,关闭</ title>应该会导致浏览器忽略页面的其余部分
允许的父母不包含其他<title>元素的<head>元素。
允许ARIA角色没有
DOM接口HTMLTitleElement

属性

这个元素只包含全局属性。

例子

<title>Awesome page title</title>

规范

SpecificationStatusComment
HTML Living StandardThe definition of '<title>' in that specification.Living Standard
HTML5The definition of '<title>' in that specification.Recommendation
HTML 4.01 SpecificationThe definition of '<title>' in that specification.Recommendation

浏览器兼容性

FeatureChromeEdgeFirefoxInternet ExplorerOperaSafari
Basic Support1.0(Yes)1.01.01.01.0

FeatureAndroidChrome for AndroidEdge mobileFirefox for AndroidIE mobileOpera AndroidiOS Safari
Basic Support(Yes)(Yes)(Yes)1.0(Yes)(Yes)(Yes)