HTML Background Color

This page contains HTML background color. Feel free to copy and paste the HTML background color into your own website, blog, MySpace page, or other HTML document. And feel free to modify the code as you wish.

Background Color Code

This example code applies a background color to a p tag using the background-color property. You can apply background color to any other HTML element, such as a div tag, body tag etc. Here, we also apply color to the text by using the color property.

Source CodeResult

This text has got a background color applied. You could also apply background color to the whole page if you like.

Background Color for the Whole Page

To set the background for the whole page, simply apply the background property against the body tag.


Choose a Color

Don't know which color to choose? Select a color from the HTML color picker.

About the HTML Codes

The HTML code on this page is provided free of charge, for you to use however you wish. Feel free to modify the code to suit your own needs.

External Style Sheets

Most of the HTML codes on this website use inline CSS. If you intend to use the codes across your whole website, you should place the CSS into an external style sheet.

To learn more, check out this explanation of external style sheets.

Web Hosting

Our partner site, ZappyHost, is a professional web hosting company providing website hosting, domain names and related products. If you need web hosting, check them out!