Home >Web Front-end >HTML Tutorial >HTML Learning Tutorial 6 Background-Color_html/css_WEB-ITnose
Has two tags to configure the background. The background can be a color or an image.
The background color property sets the background to a certain color. The attribute value can be a hexadecimal number, RGB value or color name
Among them, the third method of setting the background color only supports 16 in HTML4.0 Color names
They are: aqua, black, blue, fuchsia, gray, green, lime, maroon, navy, olive, purple, red, silver, teal, white, yellow.
While using colors as backgrounds, we can also use pictures as backgrounds:
The background property sets the background to an image. The attribute value is the URL of the image. If the image size is smaller than the browser window, the image will be copied across the entire browser window.
<body background="clouds.gif"><body background="http://www.w3school.com.cn/clouds.gif"><pre name="code" class="n">所有<span style="font-family: 'Courier New', Courier, monospace;">教程</span><span style="font-family: 'Courier New', Courier, monospace;">资源来自于:</span><span style="font-family: 'Courier New', Courier, monospace;">http://www.w3school.com.cn/html</span>