HTML DOM Heading Object

Heading object

The Heading object represents HTML heading elements: <h1> to <h6>.

Access the Heading object

You can use getElementById() to access the heading element:

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

Try It Yourself

Create a Heading object

You can use the document.createElement() method to create a heading element:

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

Try It Yourself

Heading Object Properties

Properties Description
align Not Supported in HTML5. Please Use style.textAlign.

Standard Properties and Events

Heading Object Supports StandardsPropertiesAndEvents.

Related Pages

HTML Tutorial:HTML Titles

HTML Reference Manual:HTML <h1> - <h6> Tags