Choosing Multiple Colors (optional) Choose/compare up to 3 colors. Click in a field below, then select a color from the co...
HTML Color Picke
The HTML color picker below makes it easy to choose colors for your website.
To use the HTML color picker:
- Use the slider on the right to change the hue.
- Click anywhere in the large square to pick a color.
- Once you're happy with the color, copy the hexadecimal value from the bottom field (the series of 6 digits/letters in bold (for example #FFFFFF).
Color Code Examples
Here are some quick examples of the code needed to apply color to your HTML documents. More about HTML color codes here.In HTML, you can specify color using its RGB value (using either hex or RGB notation), or by its color name. The HTML color picker below mak...
HTML Background Code
This page contains HTML background code. Feel free to copy and paste the HTML background code into your own website, blog, MySpace page, or other HTML document. And feel free to modify the code as you wish.
Shorthand Background Code
The quickest HTML code for backgrounds is the
background
property. Strictly speaking, this is a CSS property but you use it in conjunction with your HTML code. The background
property is a shorthand property for setting all background properties at once. Source Code | Result |
---|---|
| This example sets all the background properties with one property - the 'background' property. This keeps the code shorter and easier to read. |
Page Background
To set the background for the whole page, simply apply the
background
property against the body
tag.Example:
Alternative Background Codes
Below are more HTML background codes. In these examples, instead of using the
background
shorthand property, we use a property more specific to the actual effect we want to achieve. Doing this is simply an alternative - it's your choice which method you use.
Background Color
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. Choose a color with the HTML color picker.
Source Code | Result |
---|---|
| This text has got a background color applied. You could also apply background color to the whole page if you like. |
Background Image
This example code applies a background color to a
p
tag using the background-color
property. You can apply background color to any HTML element, such as a div
tag, body
tag etc. Here, we also apply color to the text by using the color
property. Source Code | Result |
---|---|
This div tag has got a background image. You could also apply a background image to the whole page if you like. | This div tag has got a background image. You could also apply a background image to the whole page if you like. |
Fixed Background Image
You can fix the background image so that it doesn't scroll when you scroll the div (or page, as the case may be).
Source Code | Result |
---|---|
background-repeat:repeat; background-attachment:fixed; overflow:scroll; width:200px; height:100px;">
| This HTML background code demonstrates how to keep the background image fixed. Scroll down to see what I mean - the background image stays in the same position. |
http://ajabingung.blogspot.com/2013/03/html-background-code.html
This page contains HTML background code. Feel free to copy and paste the HTML background code into your own website, blog, MySpace page, or...
HTML Background Code
Shorthand Background Code
The quickest HTML code for backgrounds is thebackground
property. Strictly speaking, this is a CSS property but you use it in conjunction with your HTML code. The background
property is a shorthand property for setting all background properties at once. Source Code | Result |
---|---|
This example sets all the background properties with one property - the 'background' property. This keeps the code shorter and easier to read. | This example sets all the background properties with one property - the 'background' property. This keeps the code shorter and easier to read. |
Page Background
To set the background for the whole page, simply apply thebackground
property against the body
tag.Example:
Alternative Background Codes
Below are more HTML background codes. In these examples, instead of using thebackground
shorthand property, we use a property more specific to the actual effect we want to achieve. Doing this is simply an alternative - it's your choice which method you use.Background Color
This example code applies a background color to ap
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. Choose a color with the HTML color picker.
Source Code | Result |
---|---|
This text has got a background color applied. You could also apply background color to the whole page if you like. | This text has got a background color applied. You could also apply background color to the whole page if you like. |
Background Image
This example code applies a background color to ap
tag using the background-color
property. You can apply background color to any HTML element, such as a div
tag, body
tag etc. Here, we also apply color to the text by using the color
property. Source Code | Result |
---|---|
This div tag has got a background image. You could also apply a background image to the whole page if you like. | This div tag has got a background image. You could also apply a background image to the whole page if you like. |
Fixed Background Image
You can fix the background image so that it doesn't scroll when you scroll the div (or page, as the case may be).Source Code | Result |
---|---|
This HTML background code demonstrates how to keep the background image fixed. Scroll down to see what I mean - the background image stays in the same position. | This HTML background code demonstrates how to keep the background image fixed. Scroll down to see what I mean - the background image stays in the same position. |
http://ajabingung.blogspot.com/2013/03/html-background-code.html
This page contains HTML background code. Feel free to copy and paste the HTML background code into your own website, blog, MySpace page, or...