Export (0) Print
Expand All

background-color

Sets or retrieves the color behind the content of the object.

{ background-color: sColor }

sColor

Variant that specifies or receives one of the following values:

transparent

Default. Color of the next parent object through which the background is visible.

color

Any valid HTML color value.

This property has a default value of transparent. It is not inherited.

This property can be set with the other background properties by using the background composite property.

The following example uses the background-color property to specify the background color. This example uses an inline style sheet to set the background color to beige:

<span style="font-size: 14pt; background-color: beige;">
. . . 
</span>

A, ADDRESS, B, BIG, BLOCKQUOTE, BODY, BUTTON, CAPTION, CENTER, CITE, CODE, COL, COLGROUP, CUSTOM, DD, DEFAULTS, DFN, DIV, DL, DT, EM, FIELDSET, FORM, HN, HTML, I, IFRAME, IMG, INPUT TYPE=BUTTON, INPUT TYPE=CHECKBOX, INPUT TYPE=FILE, INPUT TYPE=IMAGE, INPUT TYPE=PASSWORD, INPUT TYPE=RADIO, INPUT TYPE=RESET, INPUT TYPE=SUBMIT, INPUT TYPE=TEXT, LI, OL, OPTION, P, S, SELECT, SPAN, SUB, TABLE, TBODY, TD, TFOOT, TH, THEAD, TR, TT, U, UL, VAR, XMP

Community Additions

ADD
Show:
© 2014 Microsoft