Saturday, February 4


The color CSS property sets the foreground color value of an element’s text and text decorations, and sets the currentcolor value. currentcolor may be used as an indirect value on other properties and is the default for other color properties, such as border-color.

body {
  color: red;

h1 {
  color: #00ff00;

If you want to create gradient effect using color property, then yes you can use it. For that you need to use css color property as under using gradient.

#grad {
  background-image: linear-gradient(red, yellow);

Output of above gradient css property: