HTML background color and background image settings

Is the background of the page important? Of course the background is very important! HTML setting background has two simple modes, the simpler is to directly match the background color (bgcolor), the more exquisite is to make a background image (background), these two methods can be easily done in HTML, let’s take a look now The following background color and background image example.


1. Set the background color bgcolor
<body bgcolor="#cccccc">
<body bgcolor="orange">

As you can see from the example, we directly set bgcolor in the <body> tag and give gray (#cccccc) and orange (orange). In addition, you can also use RGB color codes to present your background color. Incidentally, bgcolor can be used in the <body> tag as well as in the HTML table to design the table background color.

2, set the background picture background
<body background="URL of background image">

HTML setting the background image is quite simple. You can use the background directly in the body. It can also be used in the HTML table to make the background image appear in the table. Note that the URL path of the image must be correct, otherwise it will not be displayed. !

Post a Comment

0 Comments