4.1.1 The html element
4.1.1 The html element
Категории:
None.
Контексты, в которых может использоваться этот элемент:
As document's document element.
Wherever a subdocument fragment is allowed in a compound document.
Контентная модель:
A head element followed by a body element.
Опущение тегов в text/html:
An html element's start tag can be omitted if the first thing inside the html element is not a comment.
An html element's end tag can be omitted if the html element is not immediately followed by a comment.
Атрибуты контента:
глобальные атрибуты
Специфика доступности:
Для авторов.
Для разработчиков.
Санитизация:
Default.
DOM-интерфейс:
[Exposed=Window]
interface HTMLHtmlElement : HTMLElement {
[HTMLConstructor] constructor();
// also has obsolete members
};
The html element represents the root of an HTML document.
Authors are encouraged to specify a lang attribute on the root html element, giving the document's language. This aids speech synthesis tools to determine what pronunciations to use, translation tools to determine what rules to use, and so forth.
The html element in the following example declares that the document's language is English.
<!DOCTYPE html>
<html lang="en">
<head>
<title>Swapping Songs</title>
</head>
<body>
<h1>Swapping Songs</h1>
<p>Tonight I swapped some of the songs I wrote with some friends, who
gave me some of the songs they wrote. I love sharing my music.</p>
</body>
</html>