Copyright © tutorialspoint.com
The HTML <body> tag is used for indicating the main content section of the HTML document. The body tag is placed between the </head> and the </html> tags.
<html> <head> <title>HTML body tag</title> </head> <body style="background-color:#f8f8f8"> Document content goes here </body> </html> |
To Become more comfortable - Do Online Practice
| 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. |
| 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. |
| 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 |
Copyright © tutorialspoint.com