English
German

HTML Bgcolor

HTML Color bgcolor

The bgcolor attribute is used to control the background of an HTML elmement, specifically page and table backgrounds. Bgcolor can be placed within several of the HTML tags. However, we suggest you only use it for your page's main background (<body>) and in tables. For additional background styling, check out CSS Backgrounds. The HTML to change the background color is simple:
 

Example:

<body bgcolor="Silver">
<p>We set the background...</p>
</body>

 

Output

background Silver


Adding Color to Your Tables

This example shows how to add a background color for an entire table using generic values of color.

Example:

<table bgcolor="lime" border="1"><tr>
<td>A lime  color table background using .</td>
</tr></table>

<table bgcolor="#ff0000" border="1"><tr>
<td>A red colored table background using hexadecimal values "#FF0000".</td>
</tr></table>

<table bgcolor="rgb(0, 0, 255)" border="1"><tr>
<td>A blue colored table background using RGB values "rgb(0, 0, 255)".</td>
</tr></table>
 

Output
A lime colored table background.
A red colored table background using hexadecimal values '#FF0000'.
A blue colored table background using RGB values 'rgb(0, 0, 255)'.

Adding Color to Table Rows and Columns

Here's a few common examples of "bgcolor" and font color

Example:

<table>
<tr bgcolor="#FFFF00"><td>This Row is Yellow!</td></tr>
<tr bgcolor="#AAAAAA"><td>This Row is Gray!</td></tr>
<tr bgcolor="#FFFF00"><td>This Row is Yellow!</td></tr>
<tr bgcolor="#AAAAAA"><td>This Row is Gray!</td></tr>
<tr bgcolor="#FFFF00"><td>This Row is Yellow!</td></tr>
<tr bgcolor="#AAAAAA"><td>This Row is Gray!</td></tr>
</table>
 

Output
This Row is Yellow!
This Row is Gray!
This Row is Yellow!
This Row is Gray!
This Row is Yellow!
This Row is Gray!

Background Color and Font Color Together

Check out this "Scoreboard" we made with the use of font color and bgcolor!

HTML BGCOLOR Example:

<table bgcolor="#000000">
<tr><td bgcolor="#009900">
<font color="#FFFF00" align="right">Green Bay</font></td>
<td><font color="#FFFFFF">13</font></td></tr>
<tr><td bgcolor="#0000FF">
<font color="#DDDDDD" align="right">New England</font></td>
<td><font color="#FFFFFF">27</font></td></tr>
</table>
 

Output
Green Bay 13
New England 27

Changing the bgcolor in different ways


HTML Tutorial,HTML Bgcolor, HTML Bgcolor example, learn HTML Bgcolor,explain example HTML Bgcolor online free training HTML Tutorial, HTML Tutorial example, learn HTML Bgcolor, online tutorial, download tutorial, HTML Tutorial books, HTML Tutorial videos, live videos HTML Tutorial, learn HTML Tutorial, HTML Tutorial topic HTML Bgcolor, live training HTML Tutorial, download free tutorial