WEB DEVELOPER SITE
HTMLCSSJAVASCRIPTSQLPHPBOOTSTRAPJQUERYANGULARXML
 

HTML DOM Body Object


Body Object

The Body object speaks to a HTML <body> element.

Access a Body Object

You can get to a <body> component by utilizing getElementsByTagName():

var x = document.getElementsByTagName("BODY")[0];

Tip: You can likewise get to a <body> component by utilizing the document.body property.

Create a Body Object

You can make a <body> component by utilizing the document.createElement() method:

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

Body Object Properties

Property Description
aLink Not upheld in HTML5. See CSS :dynamic Selector instead.
Sets or returns the shade of a functioning connection in a document
background Not upheld in HTML5. Use style.backgroundImage instead.
Sets or returns the foundation picture for a document
bgColor Not bolstered in HTML5. Use style.backgroundColor instead.
Sets or returns the foundation shade of a document
link Not bolstered in HTML5. See CSS :connect Selector instead.
Sets or returns the shade of unvisited connects in a document
text Not bolstered in HTML5. Use style.color instead.
Sets or returns the shade of the content in a document
vLink Not upheld in HTML5. See CSS :visited Selector instead.
Sets or returns the shade of visited connections in a document

Standard Properties and Events

The Body object likewise bolsters the standard properties and events.