Headings: [Skip]

Web-Design Tutorials by Dr Sam

CSS Validity

Menu [Skip]

Color Styles

Recommendation

This a "rule of thumb" by the W3C for cross-browser compatibility — not required for CSS validity.

  • Specify a color style whenever you specify a background-color style.
  • Inversely, specify a background-color style whenever you specify a color style.
  • Yes, specify both, the color and the background-color, whenever you need the one or the other.