HTML tutorial
CSS3 tutorial
Bootstrap tutorial
JavaScript tutorial
JQuery tutorial
AngularJS tutorial
React tutorial
NodeJS tutorial
PHP tutorial
Python tutorial
Python3 tutorial
Django tutorial
Linux tutorial
Docker tutorial
Ruby tutorial
Java tutorial
C tutorial
C ++ tutorial
Perl tutorial
JSP tutorial
Lua tutorial
Scala tutorial
Go tutorial
ASP.NET tutorial
C # tutorial
The Body object represents an HTML <body> element
The Body object represents an HTML <body> element.
Access a Body Object
You can access a <body> element by using getElementsByTagName():
var x = document.getElementsByTagName("BODY")[0];
Create a Body Object
You can create a <body> element by using the document.createElement() method:
var x = document.createElement("BODY");
Property | Description |
---|---|
aLink | Not supported in HTML5. See CSS :active Selector instead.
Sets or returns the color of an active link in a document |
background | Not supported in HTML5. Use style.backgroundImage instead. Sets or returns the background image for a document |
bgColor | Not supported in HTML5. Use style.backgroundColor instead. Sets or returns the background color of a document |
link | Not supported in HTML5. See CSS :link Selector instead. Sets or returns the color of unvisited links in a document |
text | Not supported in HTML5. Use style.color instead. Sets or returns the color of the text in a document |
vLink | Not supported in HTML5. See CSS :visited Selector instead.
Sets or returns the color of visited links in a document |
The Body object also supports the standard properties and events.
HTML reference: HTML <body> tag