" and "" tags is HTML type, the browser will parse the content as HTML."/> " and "" tags is HTML type, the browser will parse the content as HTML.">

Home >Web Front-end >Front-end Q&A >What is the root element of html document

What is the root element of html document

青灯夜游
青灯夜游Original
2021-11-17 14:15:158260browse

The root element of the html document is the "html" element, which is the outermost element in the HTML document; the function of the html element is to tell the browser, from "" to "

What is the root element of html document

The operating environment of this tutorial: Windows 7 system, HTML5 version, Dell G3 computer.

HTML root element

The root element of an HTML document is the html element, starting from the tag and ending with the tag. The

tag is the outermost element in an HTML document. The

tag is a container for all other HTML elements (except the tag).

The function of the root element is to tell the browser that the content between and is of HTML type, and the browser will parse the content as HTML. The

html element has three attributes, namely the lang attribute, the xmlns attribute and the manifest attribute: The

  • lang attribute specifies the default language used for page content. Specifying the language in which the document is written helps a language synthesis tool choose a pronunciation language, or a translation tool choose translation rules. For example, means that this document is in Chinese.

  • xmlns attribute assigns the XML namespace. The xmlns attribute is required in XHTML but not in HTML.

  • #The manifest attribute gives the URL of the offline cache file. HTML5 introduces application caching, which means web applications can be cached and accessed offline. For example, means that the offline cache file is waibo.manifest.

Recommended tutorial: "html video tutorial"

The above is the detailed content of What is the root element of html document. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn