HTML CSS Reference/CSS Attributes and Javascript Style Properties/background color
Содержание
"background-color" Example
<source lang="html4strict">
<html> <head> </head> <body>
Text Text Text Text Text
Text Text Text Text
Text </body> </html>
</source>
"background-color" is applied to
<source lang="html4strict">
+----------------+--------------------------------------------------------------+ | Applied_To |<a> <address> | | | |
| |<body> || |<button>
| | | | | |
| |<dir><col> | | |<colgroup> currentStyle | | |<custom>
| | |defaults | | | |
- | | | <fieldset> | | |<form> <hn> | | |<html> | | |<iframe> <img> | | |<input type="button"> <input type="checkbox"> | | |<input type="file"> <inputtype="image"> | | |<input type="password"> <input type="radio"> | | |<input type="reset"> <input type="submit"> | | |<input type="text"> <isindex> | | | <label> | | |<legend>
- | | |<listing> <marquee> | | |<menu> <nobr> | | |
<option> | | |
| | |runtimeStyle| | | <select> | | | | | || | |style | | || | |<tbody>
| | |<textarea> <tfoot> |
| |<thead> | | | | | | | | | <xmp> | +----------------+--------------------------------------------------------------+ </source>
"background-color" Possible Values
<source lang="html4strict"> Possible Values color name hexadecimal number (#RRGGBB),or name transparent the default value
</source>
"background-color" Syntax and Note
<source lang="html4strict"> Note: Sets the background color. Syntax:
element { background-color: value } elementID.style.backgroundColor = "value" document.all.elementID.style.backgroundColor = "value" // IE only
</source>