html tag (HTML 4.01)

document root element

Topics

The html tag should be the parent element to all the other HTML tags, or in other words: the root element. The standard structure of an HTML page looks like this:

<html>
  <head>
    ...
  </head>
  <body>
    ...
  </body>
</html>

As you can see, the html tag is the only top level element, with the head and the body element as child elements. Each of the two can then have several kinds of tags as their child elements.

 

For even more information, have a look at the head and the body elements.

Attributes

Attribute Deprecated Required Description
class  space-separated list of classes 
dir  direction for weak/neutral text 
id  document-wide unique id 
lang  language code 
style  associated style info 
title  advisory title 
versionX Constant 

Events

Event Description
onclicka pointer button was clicked 
ondblclicka pointer button was double clicked 
onkeydowna key was pressed down 
onkeypressa key was pressed and released 
onkeyupa key was released 
onmousedowna pointer button was pressed down 
onmousemovea pointer was moved within 
onmouseouta pointer was moved away 
onmouseovera pointer was moved onto 
onmouseupa pointer button was released 



© htmlpedia.net 2008 - 2012