HTML and CSS Reference
In-Depth Information
For example, to set the background color of one item in a bulleted list,
you could use:
<li style="background-color: blue">
Similarly, you could give all the table header cells in a document a snap-
shot negative effect with:
th {background-color: black; color: white}
If you really want your emphasized text to stand out, paint its back-
ground red:
em {background-color: red} The background-image property
The background-image property puts an image behind the contents of
an element. Its value is either a URL or the keyword none (the default
As with background colors, you can place a background image behind
the entire document or behind selected elements of a document. With
this style property, effects such as placing an image behind a table or
selected text are now simple:
<table style="background-image: url(backgrounds/woodgrain.gif)">
li.marble {background-image: url(backgrounds/marble.gif)}
The first example uses an inline style to place a wood grain finish behind
a table. The second defines a list-item class that places a marble back-
Search WWH ::

Custom Search