html element

If you don't know what an element is or how you must use it, I recommend you read the "HTML tags and attributes" tutorial that you can find in the HTML tutorials section.

Description

The html element constitutes the root of all well formed HTML documents and is supposed to wrap all other elements between its tags.

The lang attribute has a particular relevance when used in this element, as it defines the language of the entire document. This is particulary important for users relying on speech synthesisers, in the determination of the correct pronunciation.

Examples

Below is an example of a simple document. As expected, the html element is wrapping all other elements. The !DOCTYPE declaration, not being an element, stays outside.

<!DOCTYPE html>
<html>
  <head>
    <title>Jhon Weilers' place</title>
  </head>
  <body>
    <h1>Welcome!</h1>
    <p>Welcome to Jhon Weilers' place...</p>
  </body>
</html>

Attributes

Specific attributes

manifest

The location of a cache manifest document, specifying which resources the user agent should keep in the cache for offline access. The benefits of this attribute are particularly appreciated when developing web applications, as it improves speed and allows offline executions.

The manifest attribute is in the process of being removed from the standard. Its use at this time is highly discouraged.

Example

<html manifest="http://www.mywebsite.com/myapp/manifest.mf">

version

The version of the standard used to compose the document.

This attribute has become obsolete in HTML5 and, therefore, its use is no longer valid. The version of the standard the document is complying with should be specified with the !DOCTYPE declaration.

Example

<html version="3.2">

Global attributes

For information about global attributes refer to this list of global attributes in HTML5.

Events

Global events

For information about global events refer to this list of global events in HTML5.

X

Are you looking for a place to host your next website? I can help you with that!