HTML CSS examples for CSS:Color
There are several ways to define a color values in CSS.
Color keywords are case-insensitive name for a specific color, for example, red, green, blue, yellow, black, etc.
<!DOCTYPE html> <html> <head> <title>CSS Color Keywords</title> <style type="text/css"> h1 {<!--from ww w . j a v a 2 s . c om--> color: red; } p { background-color: yellow; } </style> </head> <body> <h1>This is a heading</h1> <p>This is a paragraph.</p> </body> </html>