• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint

CSS and Tables

A number of table element attributes have been deprecated in HTML 4 and XHTML 1, in favor of using styles to achieve the same or better results. The focus of this book is on creating Web pages without using deprecated HTML elements or attributes. The examples included in this chapter show you how to use CSS styles to control the presentation of HTML tables. See Table 12.1 for a listing of HTML attributes used in tables that have been deprecated, along with their CSS alternatives.

Table 12.1. Deprecated Table Element Attributes
HTML Attribute Where Deprecated CSS Alternative
align table, caption text-align
bgcolor table, tr, background or td, th background-color
height td, th height
nowrap td, th white-space: nowrap
width td, th width



PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint