Web Design

(Nancy Kaufman) #1

164


Format Tables with CSS ..........................................


3 Within the style sheet, type
table.
4 Press.
5 Type {.
6 Press.
7 Type background-
color: ?;, replacing?
with a valid color value.

1 In your editor, open a
document that contains
a table.
2 If necessary, add an opening
and closing <style> tag to
the head of the document.

Note: The steps below can also
be done in an external style
sheet.


Format Tables with CSS


B


ecause CSS styling relies on applying rules to elements on the page, designers are given a
rich set of possibilities when styling tables thanks to the number of tags involved. With some
creativity, tables can become one of the most visually exciting elements on a page. CSS properties
that format text, such as font and color, can be applied to the text in cells. In addition, the
background-color and background-image properties will work for tables, rows, or cells.
You can also use CSS to add and format the border of the table.

1


5


3


7


2

Free download pdf