WEB DEVELOPER SITE
HTMLCSSJAVASCRIPTSQLPHPBOOTSTRAPJQUERYANGULARXML
 

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():

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

Create a Div Object

You can create a <div> element by using the document.createElement() method:

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

Div Object Properties

Property Description
align Not supported in HTML5. Use

Standard Properties and Events

The Div object also supports the standard properties and events.