<table>—Creating Tables

The <table> element is always a popular one, and you use it to create tables. To build a table, you enclose other elements in <table>, such as <caption>, <tr>, <th>, <td>, <colspan>, <col>, <thead>, <tbody>, and <tfoot>. This element is supported in XHTML 1.0 Strict, XHTML 1.0 Transitional, XHTML 1.0 Frameset, and XHTML 1.1. Here are its attributes:

  • align— Deprecated in HTML 4.0. Sets the horizontal alignment of the table in the browser window. You can set this to left, center, or right. (XHTML 1.0 Transitional, XHTML 1.0 Frameset.)

  • bgcolor— Deprecated in HTML 4.0. Sets the background color of table cells. Even though this attribute is deprecated, stylesheet support for tables is still limited and inconsistent across browsers. ...

Get Real World XML 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.