1. Background:<body> has two tabs for the configuration background. The background can be a color or an image.
2. Background color--bgcolor: Background Color property sets the background to a color. The property value can be a hexadecimal number, an RGB value, or a color name.
bgcolor="#000000"
bgcolor="rgb(0,0,0)"
bgcolor="black"
>
The above code sets the background color to black.
3. Background--background
Background property sets the background as an image. The property value is the URL of the image. If the image size is smaller than the browser window, the image is copied throughout the browser window.
background="clouds.gif"
background="http://www.w3school.com.cn/clouds.gif"
>
The URL can be a relative address
4. Basic precautions
The background color (bgcolor), background (background), and text properties in the <body> tag have been deprecated in the latest HTML standards (HTML4 and XHTML). These attributes have been removed by the consortium in their recommendation criteria.
You should use cascading style sheets (CSS) to define the layout and display properties of HTML elements.
"HTML Background" November 16, 2015 Learning HTML notes