Web Development and Design Foundations with XHTML, 5th Edition

(Steven Felgate) #1

(^316) Chapter 8 Tables
The alignAttribute.This attribute specifies the alignment of the table with the values
right, center, and left. The table shown in Figure 8.6 has the alignattribute set to
center.
Figure 8.6
Centered table with
widthset to 75%
Figure 8.7
Table with a border
set to 10
Even though it is still often used, the W3C has deprecated the use of the alignattribute
with the

tag. Later in this chapter you’ll use CSS to replace the functionality
of most of the table attributes—including configuring the horizontal alignment, borders,
width, padding, and background color of XHTML tables.
The borderAttribute. This attribute specifies whether and what type of visible border
the table will have. The value ranges from 0 to 100, with 0 indicating that no border
will be visible. The values between 1 and 100 determine the thickness of the visible
border, where 1 indicates a relatively thin border and 100 indicates a very thick border.
The table shown in Figure 8.7 has a border set to 10.
The browser determines the border color and shading based on the page background
color. If you want a specific color, also use the bordercolorattribute.
The bordercolorAttribute. This attribute specifies the color of the border.
The values can be a color name or numeric value. See the color chart at
http://webdevfoundations.net/color. The browser displays the border color as a solid
color and does not shade the border when the bordercolorattribute is used. The