HTML Colors

Colors shown on a computer monitor or any digital device are constructed using various amounts of red, green, and blue light. By blending together different amounts of each color of light, a computer monitor is able to display millions of different colors depending on the quality of the computer monitor. This concept is precisely what HTML numeric (RGB) values use. They specify the amount of each of the different colors of light to blend together (red, green, and blue light).

A color can be specified by using a color name, an RGB value, or a HEX value.

Colors are very important to give a good look and feel to your website. You can specify colors on page level using <body> tag or you can set colors for individual tags using bgcolor attribute.

HTML Color Coding Methods

There are following three different methods to set colors in your web page: