HTML | <body> background Attribute
The HTML <body> background Attribute is used to specify the background-image for the document.
Syntax:
<body background="URL">
Attribute Values: It contains the value i.e URL Which specify the address of the background Image.
- Absolute URL: It points to another website.
- Relative URL: It points to a file within a website.
Example:
<!DOCTYPE html> <html> <head> <title> HTML body Background Attribute </title> </head> <!-- body tag starts here --><body background= <center> <h1>GeeksforGeeks</h1> <h2>HTML <body> background Attribute</h2> <a href="#"> It is a Computer Science portal For Geeks </a> </center> </body> <!-- body tag ends here --> </html> |
chevron_right
filter_none
Output:

Supported Browsers: The browser supported by <body> background are listed below:
- Google Chrome
- Internet Explorer
- Firefox
- Safari
- Opera
Recommended Posts:
- HTML | DOM Style background Property
- HTML | Change Background color using onmouseover property
- Difference between background and background-color
- HTML | <li> value Attribute
- HTML | <img> src Attribute
- HTML | min Attribute
- HTML | <map> name Attribute
- HTML | dir Attribute
- HTML | value Attribute
- HTML | <img> alt Attribute
- HTML | for Attribute
- HTML | low Attribute
- HTML | <a> rel Attribute
- HTML <button> value Attribute
- HTML | <col> width Attribute
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to contribute@geeksforgeeks.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.



