A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://developer.mozilla.org/en-US/docs/Web/HTML/Element/html below:

<html>: The HTML Document / Root element - HTML

Attributes

This element includes the global attributes.

version Deprecated

Specifies the version of the HTML Document Type Definition that governs the current document. This attribute is not needed, because it is redundant with the version information in the document type declaration.

xmlns

Specifies the XML Namespace of the document. Default value is "http://www.w3.org/1999/xhtml". This is required in documents parsed with XML parsers, and optional in text/html documents.

Accessibility

While HTML does not require authors to specify <html> element start and ending tags, it is important for authors to do so as it will allow them to specify the lang for the webpage. Providing a lang attribute with a valid BCP 47 language tag on the <html> element will help screen reading technology determine the proper language to announce. The identifying language tag should describe the language used by the majority of the content of the page. Without it, screen readers will typically default to the operating system's set language, which may cause mispronunciations.

Including a valid lang declaration on the <html> element also ensures that important metadata contained in the page's <head>, such as the page's <title>, are also announced properly.

Example
<!doctype html>
<html lang="en">
  <head>
    <!-- … -->
  </head>
  <body>
    <!-- … -->
  </body>
</html>
Technical summary Content categories None. Permitted content One <head> element, followed by one <body> element. Tag omission The start tag may be omitted if the first thing inside the <html> element is not a comment.
The end tag may be omitted if the <html> element is not immediately followed by a comment. Permitted parents None. This is the root element of a document. Implicit ARIA role document Permitted ARIA roles No role permitted DOM interface HTMLHtmlElement Specifications Browser compatibility

Loading…

See also

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.5