Description:
The <body> tag defines the document's body. The HTML body tag acts as a container for all the renderable content of the document.
The <body> element contains all the contents of an HTML document, such as text, hyperlinks, images, tables, lists, etc.
Example:
|
<html> <head> <title>Example for the HTML body tag</title> </head> <body> Document's content. </body> </html> |
Attributes:
| Attribute | Value | Description |
|---|---|---|
| alink |
rgb(x,x,x) #xxxxxx colorname |
Deprecated - Specifies the color of the active links in the document. |
| background | URL | Deprecated - Specifies the background image file path. |
| bgcolor |
rgb(x,x,x) #xxxxxx colorname |
Deprecated - Specifies the background color. |
| link |
rgb(x,x,x) #xxxxxx colorname |
Deprecated - Specifies the color of all the links in the document. |
| text |
rgb(x,x,x) #xxxxxx colorname |
Deprecated - Specifies the color of the text in the document. |
| vlink |
rgb(x,x,x) #xxxxxx colorname |
Deprecated - Specifies the color of the visited links in the document. |
Standard Attributes:
| Attribute | Description |
|---|---|
| accesskey | Access keys (or shortcut keys) |
| class | Document wide identifier |
| dir | Specifies the direction of the text |
| id | Document wide identifier |
| tabindex | Helps determine the tabbing order when the user 'tabs' through the elements on the page. |
| title | Specifies a title to associate with the element. |
| style | Helps to include inline casecadubf style sheet. |
| lang | Sets the language code. |
Event Attributes:
| Attribute | Description |
|---|---|
| onfocus | Script runs when the element gets focus |
| onblur | Script runs when the element loses focus |
| onclick | Script runs when a mouse click |
| ondblclick | Script runs when a mouse double-click |
| onmousedown | Script runs when mouse button is pressed |
| onmouseup | Script runs when mouse button is released |
| onmouseover | Script runs when mouse pointer moves over an element |
| onmousemove | Script runs when mouse pointer moves |
| onmouseout | Script runs when mouse pointer moves out of an element |
| onkeypress | Script runs when key is pressed and released |
| onkeydown | Script runs when key is pressed |
| onkeyup | Script runs when key is released |
The post HTML body tag appeared first on .