HTML Background Code
This article provides HTML background code - code for setting the background properties of an HTML element.
The following examples use Cascading Style Sheets
(CSS). CSS is the best way of setting the background properties in your
HTML. It's more flexible than the (outdated) HTML method (more on that
below). Using CSS, you can set the background properties of any HTML
element. Plus you can do things like, specify an image's position,
whether it should repeat, how it should repeat etc.
You can set the background color of any HTML element using the background-color
property. You can choose a background color with the HTML color chart
HTML Color Codes
Use this page to get HTML color codes for your website. The colors
are represented by their hexadecimal values (the most common method for
the web). On the color picker, you can also see the RGB values (you can
use these for the web too).
Example of HTML color code usage:
To learn more about HTML colors and how to apply them to your website, check out the HTML colors
section of the HTML tutorial.