HTML CSS examples for CSS:Color
You can use RGB (red-green-blue) color model to define color values in CSS.
The RGB value in hexadecimal notation is specified with a '#' character followed by either three or six hexadecimal characters (0-9, a-f).
When six-digit notation (#rrggbb) is used,
The three-digit hexadecimal notation (#rgb) can be converted into six-digit form (#rrggbb) by replicating digits.
For example, #03f can be expanded to #0033ff, but both values represent the same color.
<!DOCTYPE html> <html> <head> <title>CSS Hexadecimal Notation</title> <style type="text/css"> h1 {<!--from w w w . j av a 2 s .com--> color: #f80; } p { background-color: #ff8800; } </style> </head> <body> <h1>This is a heading</h1> <p>This is a paragraph.</p> </body> </html>