Difference between revisions of "Background-color"

From Htmlpedia
Jump to: navigation, search
 
Line 1: Line 1:
 
==CSS 1 property: background-color==
 
==CSS 1 property: background-color==
  
This article is a stub for the property background-color.  Please help us improve HTMLpedia by improving this article.
+
The background-color property sets the background color of the text in the selected elements.
  
 
===Property Values===
 
===Property Values===
Line 14: Line 14:
  
 
<good><pre>&lt;style type="text/css"&gt;
 
<good><pre>&lt;style type="text/css"&gt;
     element { background-color: value; }
+
     a { background-color: green; }
 
&lt;/style&gt;
 
&lt;/style&gt;
 
...
 
...
&lt;element attribute="foo"&gt;Contents&lt;/element&gt;</pre></good>
+
&lt;a href="http://www.example.com/"&gt;Black link on a green background&lt;/a&gt;</pre></good>
  
 
===Browser Support===
 
===Browser Support===
Line 59: Line 59:
 
* W3C Specification: [http://www.w3.org/TR/CSS1 CSS Specification Level 1]
 
* W3C Specification: [http://www.w3.org/TR/CSS1 CSS Specification Level 1]
 
* HTMLpedia: [[List of CSS Properties]]
 
* HTMLpedia: [[List of CSS Properties]]
 +
* HTMLpedia: [[CSS Color Values]]

Latest revision as of 02:42, 30 November 2006

CSS 1 property: background-color

The background-color property sets the background color of the text in the selected elements.

Property Values

This property accepts the following values:

  • List
  • of
  • values

Example

Good
<style type="text/css">
     a { background-color: green; }
</style>
...
<a href="http://www.example.com/">Black link on a green background</a>

Browser Support

If you have tested support for this property in any of the following browsers, please indicate its level of support using one of the following keywords:

  • Full
  • Partial
  • Buggy
  • None

If you indicate that support is "Partial" or "Buggy," please add further comments explaining what's missing or what doesn't work right.

IE 3 
Support is Unknown
IE 4 
Support is Unknown
IE 5 
Support is Unknown
IE 5.5 
Support is Unknown
IE 6 
Support is Unknown
IE 7 
Support is Unknown
NS 3 
Support is Unknown
NS 4 
Support is Unknown
NS 4.5 
Support is Unknown
NS 6 
Support is Unknown
NS 7 
Support is Unknown
NS 8 
Support is Unknown
Firefox 1 
Support is Unknown
Firefox 1.5 
Support is Unknown
Firefox 2 
Support is Unknown
Mozilla 
Support is Unknown
Opera 6 
Support is Unknown
Opera 7 
Support is Unknown
Opera 8 
Support is Unknown
Opera 9 
Support is Unknown

Tips and Tricks

If you know of any useful or uncommon tips or techniques using this property, please describe them here.

References