HTML Colors are used to give a decorative look to your HTML document. Colors can be added to the HTML document, using the BODY tag. In an HTML document you can also use the bgcolor attribute in the body tag to include Colors in your website.
The bgcolor attribute is used to add color to the background of your HTML document.
The background attribute is used in the body tag to indicate an image file that can be used to tile the background of the HTML document. This will be added to the browser’s display window.
The method to use this tag is as follows:
<body background = “URL of Image that you want to tile the background of HTML document”>
The value that is assigned to the background attribute is the URL of the image you wanted to be the background. This has been done above.
HTML Color codes
The HTML Color code provides Color that you can use for your website. Through HTML Color codes you can Color your background, tables, and the text.
In your HTML document you can also specify the Color that you want to use by using the Color name directly. For example you can directly use red, green, blue, etc. There total 16 standard Colors, which you can use to Color the background, text and tables or cells. These standard Colors are as follows:
Navy, white, Black, blue, yellow, fuchsia, red, aqua, maroon, gray, lime, silver, green, olive, purple, teal.
These Colors have HEX and RGB codes or values that are used to include these Colors.
The HEX codes of some of the Colors are as follows:
|Color Name||HEX Value|
These codes can be used as follows