CSS | Styles | Colors | Type | Classes-IDs | Layout | Properties | Value Types
The color property defines the Color of any selected element. All colors on the web are defined as RGB values. Three methods of defining RGB values are hexadecimal, integer, or percentage. See a Color Slider for a visual example.
Hexadecimal RGB values range from 0 to 9 and A to F (the A to F values represent 10 to 15). The 0 value represents black. The F value represents white. All colors are defined by a variation of these values.
The hexadecimal value is declared with the # pound operator and coded as three sets of paired values. The first set represents red. The second set represents green. The third set represents blue. The CSS file is coded as...
The XHTML file is coded as...
The output to the browser is...
This is a paragraph.
The background-color property defines the background color of any selected element. The CSS file is coded as...
The output to the browser is...
This is a paragraph.
Integer RGB values range from 0 to 255. The 0 value represents black. The 255 value represents white. All colors are defined by a variation of values within this range.
The integer value is declared with the RGB operator and coded as three separate values. The first value represents red. The second value represents green. The third value represents blue. The CSS file is coded as...
The output to the browser is...
This is a paragraph.
Percentage RGB values range from 0% to 100%. The 0% value represents black. The 100% value represents white. All colors are defined by a variation of values within this range.
The percentage value is declared with the RGB operator and coded as three separate values. The first value represents red. The second value represents green. The third value represents blue. The CSS file is coded as...
The output to the browser is...
This is a paragraph.