HTML DOM Header Object

Header Object

The Header Object is new in HTML5.

The Header object speaks to a HTML <header> element.

Note: The <header> component isn't bolstered in Internet Explorer 8 and prior versions.

Access a Header Object

You can get to a <header> component by utilizing getElementById():

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

Create a Header Object

You can make a <header> component by utilizing the document.createElement() method:

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

Related Pages

HTML tutorial: HTML5 Semantic Elements

HTML reference: HTML <header> tag

JavaScript reference: HTML DOM Footer Object