Home > Web Front-end > HTML Tutorial > HTML Learning Tutorial 6 Background-Color_html/css_WEB-ITnose

HTML Learning Tutorial 6 Background-Color_html/css_WEB-ITnose

WBOY
Release: 2016-06-24 11:48:09
Original
1046 people have browsed it


Pairing a good background in HTML can make it easier for the audience to read.


Backgrounds

Has two tags to configure the background. The background can be a color or an image.

Background color (Bgcolor)

The background color property sets the background to a certain color. The attribute value can be a hexadecimal number, RGB value or color name



These three methods all set the background color to black

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:

Background (Background)

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>
Copy after login

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template