HTML DOM Div Object
Div Object
The Div object represents the HTML <div> element.
Access Div Object
You can use getElementById() to access the <div> element:
var x = document.getElementById("myDIV");
Create Div Object
You can use the document.createElement() method to create a <div> element:
var x = document.createElement("DIV");
Div Object Properties
Properties | Description |
---|---|
align |
Not supported in HTML5.Please use style.textAlign. Sets or returns the value of the align attribute of the <div> element. |
Standard Properties and Events
Div Object Supports StandardsPropertiesAndEvents.