CSS alternatives

Authors may use the text-align property to specify the horizontal alignment for the contents of any table element (including the table element itself). The text-align property may also be applied to any element contained within a table cell, thus overriding the cell- or row-level alignment settings.

For vertical centering, applying the vertical-align style property to the td or th element has the same effect as the valign attribute. The available values for vertical-align when applied to table cells are baseline, top, middle, and bottom.

Get Web Design in a Nutshell, 3rd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.