HTML DOM HTML Object

HTML object

The HTML object represents the HTML <html> element.

Access the HTML object

You can use getElementById() to access the <html> element:

var x = document.getElementsByTagName("HTML")[0];

Try It Yourself

Tip:You can also use document.documentElement Property Access the <html> Element.

Standard Properties and Events

HTML Object Supported StandardsPropertiesAndEvents.

Related Pages

HTML Tutorial:HTML Introduction

HTML Reference Manual:HTML <html> Tag