Quackit Logo
HTML
CSS
Scripting
Database
Hosting
Design
XML

Print Version

CSS bgcolor

You may be familiar with the HTML bgcolor attribute. This attribute (which is now deprecated) allows you to set the background color of HTML elements such as the TABLE element or the BODY element.

Although there is no CSS bgcolor property or attribute, there is the CSS background-color property. background-color is the CSS equivalent to the HTML bgcolor attribute. Actually, the CSS background-color property is more powerful than the HTML bgcolor attribute - it can be applied to any element.

Example of Usage

<style>
body { background-color:#ff9900; }
</style>

Also see the CSS background property for setting all background properties of an element.

Enjoy this website?

  • Share
  • Add this page to your Favorites
  • Link to this page (copy/paste into your own website or blog):
  • Link to Quackit using one of these banner ads.
  • Help support Quackit by making a donation

Oh, and thank you for supporting Quackit!

© Copyright 2000 - 2010 Quackit.com