HTML DOM Div Object
Div Object
The Div object represents an HTML <div> element.
Access a Div Object
You can access a <div> element by using getElementById():
Create a Div Object
You can create a <div> element by using the document.createElement() method:
Div Object Properties
Property | Description |
---|---|
align | Not supported in HTML5. Use
style.textAlign instead. Sets or returns the value of the align attribute of the <div> element |
Standard Properties and Events
The Div object also supports the standard properties and events.
Related Pages
HTML tutorial: HTML Blocks
HTML reference: HTML <div> tag