Web Page Background Color

 

Web Page Background Color

You can specify the background color of an HTML web page.

The BODY tag follows the HEAD tag within an HTML document.

The contents of your web page is displayed between the BODY tags. This includes everything displayed when viewed through a web browser.
 

HTML Background Colors

You can specify the background color of an HTML web page by adding the BGCOLOR attribute to your HTML BODY tag.

Specifying the background color of an HTML web page isn’t necessary if you simply want the background color white, as this is the default setting.

However, if you would like to display the background color in any other color, you must include the BGCOLOR attribute.

<body bgcolor"#ffffff">

 

CSS Background Colors

You can also use CSS to specify a web page background color.

Place the following code between your <head> and </head> tags within your HTML.

<style type="text/css">
body
{
background-color:#dddddd;
}
</style>

 
Although you can specify the background color of an HTML web page, it is always best to display black text on a white background.

For additional information on HTML codes, visit the HTML Tutorial section.

For additional information on CSS codes, visit the CSS Tutorial section.

This concludes the Web Page Background Color code.
 

 

 
Visit the following pages for a wealth of copy and paste codes and tips:

HTML Tips
Copy and paste special effect HTML codes for your web page.

HTML Codes
An HTML codes chart you can use to copy and paste codes into your web page.

HTML Color Codes
An HTML color codes chart you can use to copy and paste color codes into your web page.

JavaScript Codes
Copy and paste special effect JavaScript codes for your web page.

Web Design Tips
Tips, tricks, and special effect codes for your web page.

HTML Tags
A list of HTML tags.

HTML 5 Tags
A list of the latest HTML tags to be developed.

ASCII Codes
Special text characters and code for your web page.