WEB DEVELOPER SITE
HTMLCSSJAVASCRIPTSQLPHPBOOTSTRAPJQUERYANGULARXML
 

HTML DOM Heading Object


Heading Object

The Heading object speaks to a HTML heading component: <h1> to <h6>.

Access a Heading Object

You can get to a heading component by utilizing getElementById():

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

Create a Heading Object

You can make a heading component by utilizing the document.createElement() method:

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

Heading Object Properties

Property Description
align Not upheld in HTML5. Use style.textAlign instead.
Sets or returns the estimation of the adjust characteristic of the heading element