Description

The HTML <html> element represents the root (top-level element) of an HTML document, so it is also referred to as the root element. All other elements must be descendants of this element.

CSS Display:block

Syntax

<!DOCTYPE html> <html> <head>...</head> <body>...</body> </html>

Examples

Basic HTML Document
<!DOCTYPE html> <html lang="en"> <head> <title>Title</title> </head> <body> <h1>Hello</h1> </body> </html>
A basic skeleton starting from the root html element.

Notes

A valid web document should start with the <!DOCTYPE html> declaration. Technically, it is not an HTML tag, but an instruction to the browser about the language version. The <html> tag follows immediately after it.

It is highly recommended to always include the lang attribute (e.g., <html lang="en">) to declare the document's primary language. This assists screen readers for accessibility and benefits SEO.