HTML-The bgcolor Attribute

HTML-The bgcolor Attribute

HTML – The bgcolor Attribute

The bgcolor characteristic is utilized in order to determine the background color of an HTML element. Bgcolor is one of those characteristics that have become belittled by the execution of Cascading Style Sheets . The reason we’ve maintained it in this tutorial is due to the fact that it will provide us with an occasion to introduce web colors and supplementing some life to our HTML web page as we continue to move forward through this tutorial. It will be utilized as a visual help for you as you are grasping the mechanics of creating a table.

Without much effort, we can bring that boring white web page to life by suplementing some color with the bgcolor characteristic.

HTML Bgcolor Code:



Html – web colors

Our example utilizes the text value, which is one of three various kinds of color values that can be utilized with the bgcolor characteristic. Tables of the 16 key HTML color values that are presented to HTML web designers are offered below.

HTML Basic Colors:

Black Gray Silver White
Yellow Lime Aqua Fuchsia
Red Green Blue Purple
Maroon Olive Navy Teal


While the table above shows only 16 colors, 16 is of course not restrict to our color wheel. As we pointed out, HTML supports three various kinds of color values involving text values (which we’ve pretty much covered above), numeric, (RGB) and hexadecimal values. We’ll go into more detail regarding these values so just sit tight. This next example presents a creep peak at what these values may seem.

HTML Code:


HTML developers are allowed to broaden the color wheel beyond 16 colors via Hexadecimal and numeric color values (RGB). Way beyond 16, in fact however it’s not necessary to memorize 256+ unique color combinations; instead, we can use numeric and hexadecimal values and calculate color shades. We’ll show teach how to utilize them in our HTML Color Codes page.


Html – coloring fonts, table rows, & table columns

Some usual examples of bgcolor in action are presented.

HTML Bgcolor Code:


Investigate this “Scoreboard” we create with the use of font color and bgcolor!

HTML Code:



  • If you are novice with regard to HTML, consider sticking with color names in order to determining your background color.
  • 256 “true colors” are exists along with hexadecimal values. Hex-pairs for red, green, and blue create the colors. Examples: #99FFCC, #33AA44.
  • When the 3 paired amounts of each color are identical shades of gray take place. Example. “rgb(100,100,100)”, “#333333,” “#0A0A0A”
  • Evade light, headache-causing color plans! Keep your coloring vivid and decisive.
  • Check out our HTML Color Codes lesson for more information about colors.

Leave a Reply

Your email address will not be published. Required fields are marked *