X
HOME HTML CSS JAVASCRIPT SQL PHP JQUERY ANGULAR BOOTSTRAP XML ASP.NET MORE...
REFERENCES | EXAMPLES | FORUM | ABOUT

HTML DOM Heading Object


Heading Object

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

Access a Heading Object

You can access a heading element by using getElementById():

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

Create a Heading Object

You can create a heading element by using the document.createElement() method:

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

Heading Object Properties

Property Description
align Not supported in HTML5. Use style.textAlign instead.
Sets or returns the value of the align attribute of the heading element

Standard Properties and Events

The Heading object also supports the standard properties and events.


Related Pages

HTML tutorial: HTML Headings

HTML reference: HTML <h1> to <h6> Tags



Your suggestion:

Close [X]

Thank You For Helping Us!

Your message has been sent to W3Schools.

Close [X]
Search w3schools.com:

WEB HOSTING

UK Reseller Hosting

WEB BUILDING

Download XML Editor FREE Website BUILDER Free HTML5 Templates

SHARE THIS PAGE

facebook