This is the main structural element in a HTML document.

Html element must be included in a document.

All other elements, except document type definition (DTD), must be placed inside html element.

Main child elements to <html> are <head> and <body> elements.

Syntax:

<html></html>

Attributes:

  • lang (language information), dir (text direction)

Example

Typical HTML based document:

x
 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head> 
<title>HTML tutorial</title>
</head>
<body> 
<p>Typical HTML document</p>
</body>
</html>

 

›› go to examples ››