HTML DOM Header Object


Header Object

The Header object represents an HTML <header> element.

Access a Header Object

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

Example

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

Create a Header Object

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

Example

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

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


Copyright 1999-2023 by Refsnes Data. All Rights Reserved.