Posts in current category

HTML5 <html> tag

May 03, 2021 15:00 HTML5

Table of contents

Definitions and usages

HTML5 and html tags are all other HTML elements (except .lt;!) D OCTYPE and labels) containers.

The tab tells the browser that this is an HTML document.

Html elements are the outerst elements in an HTML document.

Html elements can also be called root elements.

Simple HTML 5 documentation:

<title>Title of the document</title>
The content of the document......

The difference between HTML 4.01 and HTML 5

The xmlns property in HTML 4.01 is required in XHTML. I t doesn't actually work, but for validation reasons, it's helpful in converting HTML to XHTML. In HTML 5, there is no reason to do this, but you can still define the xmlns property as ""

In HTML 5, there is a new property: manifest.

Tips and comments

Note: If for some reason you want to define the xmlns property, the only legal value is ""


Property Value Describe
manifest Url Define a URL on which the cached information for the document is described.
xmlns Define the XML namespace property.

The standard property

Labels support standard properties in HTML 5.

The event property

The tag supports event properties in HTML 5

Note that, as the outermost element of an HTML document, write the tag correctly and place it correctly in the html tag!

Although it is not required in HTML and can be implicit, the open and closed labels of the elements must be explicitly given in XHTML.