O'Reilly logo

Microsoft® HTML5 Step by Step by Faithe Wempen

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Applying Background and Foreground Fills

Each table, row, and cell is its own distinct area, and each can have its own background. For example, you might want to apply a different color background to a heading row to make it stand out, or change the color of every other line in a listing to help visitors track a line across the table, as shown in the following example.

image with no caption

To apply a background color to a table, use the same background-color style rule that you use for documents. For example, to make a certain row orange, use the following:

<tr style="background-color: orange">

The table background can also be a picture, just like a document background. ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required