THE INDIA LARGEST WEB DEVELOPER SITE
HTMLCSSJAVASCRIPTSQLPHPBOOTSTRAPJQUERYANGULARXML
 

HTML DOM Header Object


Header Object

The Header Object is new in HTML5.

The Header object represents an HTML <header> element.

Note: The <header> element is not supported in Internet Explorer 8 and earlier versions.

Access a Header Object

You can access a <header> element by using getElementById():

var x = document.getElementById("myHeader"); Try it

Create a Header Object

You can create a <header> element by using the document.createElement() method:

var x = document.createElement("HEADER"); Try it

Standard Properties and Events

The Header object also supports the standard properties and events.


Related Pages

HTML tutorial: HTML5 Semantic Elements

HTML reference: HTML <header> tag

JavaScript reference: HTML DOM Footer Object