CSS Changing Text Background

Changing the background of text will make it appear as if those text are being highlighted. Not only can you change the background color of some selected text, but you can also use an image as a background for those text.

To change the background color:

p {background: color}, where color is either the hexadecimal value of the color that you want, or it can be a name of one of the 16 predefined color.

To use a background image for text:

p{background: url(URL to location of image)} You must type in the full url address.

CSS Changing The Background Of A Web Page

Using the same code as shown above, you can also change the background color of your web page. You can also use an image as the background for your web page by using the same code as shown above.

All that you simply do is to apply the code to the entire body of a web page.

body {background: color}

or

body {background: url(URL to the location of image)}

Next: CSS Web Page Layout

Template Design | Elque 2007