B.24. color

This property sets the foreground (text) color of the element. This property also defines the default border color of the element.

In general, you should always specify a background color when you specify a foreground color, and vice versa.

Inherited: Yes

See also: Section B.4background-color

B.24.1. Value

Any CSS color value (see Appendix D).

Initial value: black

B.24.2. Compatibility

CSS Version: 1

Works in all CSS-compatible browsers including Internet Explorer 4 or later, Netscape 4 or later, and Mozilla browsers.

B.24.3. Example

This style rule sets paragraphs of class warning to have white text on a tomato red background.

p.warning {
  color: white;
  background-color: #ff6347;
}

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.145.93.136