Browse By Name
HTMLCSSJavaScriptAppendix
You are here: Reference > HTML > tags > body

body element

A A Font size Print Content Add new content Share Share
Browser support:
Specifies the main body of an HTML document.
The body element contains the visible content of an HTML document.
If you want to see the HTML tags by categories, please visit this page.
This element requires a closing tag.
If you want to use this element dynamically, visit the JavaScript page for this tag: body.

Possible members:

Attributes
Events
Styles
Pseudos
accessKey
Sets an access key to an element.
aLink
Sets the color of the active hypertext links in the entire document.
background
Sets the background picture, which will be tiled to provide the body background.
bgColor
Sets the background color.
bgProperties
Sets whether the background picture, specified by the background attribute, is fixed or scrollable.
bottomMargin
Specifies the thickness of the bottom margin in the document body.
class
Sets the style class or classes that belong to the element.
contentEditable
Sets whether the contents of the object are editable.
dir
Sets the text direction as related to the lang attribute.
DISABLED
Sets the state of an object for user interaction.
draggable
Sets whether an element is draggable.
HIDEFOCUS
Specifies whether a dotted rectangle (focus rectangle) is drawn around an object while it has focus.
id
Sets a unique identifier for the object.
lang
Specifies the language of the element.
language
Sets the scripting language for the current element. Use it only for the script element.
leftMargin
Sets the left margin for the document body in pixels.
link
Sets the color of the hypertext links in the entire document that have not been visited and activated yet.
name
Sets the name of an element.
NOWRAP
Specifies whether the text in a table cell can be wrapped.
rightMargin
Sets the right margin for the document body in pixels.
scroll
Sets the state of the scroll bars.
spellcheck
Sets whether the automatic spellchecker is enabled.
style
Sets an inline style associated with an element.
tabIndex
Specifies the tabbing order for keyboard navigation using the TAB key.
text
Specifies the color of the text in the document body.
title
Specifies a ToolTip for an object.
topMargin
Specifies the thickness of the top margin in the document body.
unSelectable
Sets whether an element is selectable or not.
vLink
Sets the color of the visited hypertext links in the entire document.
xml:lang
Sets the language code of the XML document.

Example HTML code 1:

This example illustrates the use of the body element:
<html>
    <head>
        <title>My HomePage</title>
    </head>
    <body>
        The contents of the HTML document.
    </body>
</html>
Did you find this example helpful? yes no

Related pages:

External links:

User Contributed Comments

Post Content

Post Content