HTML and CSS Reference
In-Depth Information
10.2.1.1. The align attribute (deprecated)
The HTML 4 and XHTML standards have deprecated this attribute in fa-
vor of the align property provided by CSS, yet it remains popular and is
currently well supported by the popular browsers.
Like images, tables are rectangular objects that float in the browser dis-
play, aligned according to the current text flow. Normally, the browser
left-justifies a table, abutting its left edge to the left margin of the dis-
play window. Or the table may be centered if under the influence of the
<center> tag, a centered paragraph, or a centered division. Unlike im-
ages, however, tables are not inline objects. Text content normally flows
above and below a table, not beside it. You can change that display be-
havior with the align attribute or a cascading style definition for the <t-
able> tag.
The align attribute accepts a value of either left, right , or center , in-
dicating that the table should be placed flush against the left or right
margin of the text flow, with the text flowing around the table, or in the
middle with text flowing above and below, respectively.
Note that the align attribute within the <table> tag is different from
those used within a table's element tags, <tr>, <td> , and <th> . In those
tags, the attribute controls text alignment within the table's cells, not
alignment of the table within the containing body-text flow.
10.2.1.2. The bgcolor and background attributes
You can make the background of a table a different color than the
document's background with the bgcolor attribute for the <table> tag.
You must set the color value for the bgcolor attribute to either a red,
blue, and green (RGB) color value or a standard color name. Appendix
G provides both the syntax of color values and the acceptable color
names.
The popular browsers give every cell in the table (but not the caption)
this background color. You may also set individual row and cell colors
 
Search WWH ::




Custom Search