• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 17. Tables > Xml and Tables

Xml and Tables

At the start of this chapter, we showed the various parts of a table in HTML. The same parts can occur in an XML-based format, but in that case, the browser probably has no built-in knowledge about which XML element corresponds to which part of the table. To help with that, the display property has keywords for each of the parts. The keywords are as follows:

  • table (corresponding to TABLE in HTML) – Specifies that an element defines a block-level table.

  • inline-table (doesn’t exist in HTML) – Like table, but the table doesn’t start on a new line. Instead, it is placed inline.

  • table-row (in HTML: TR) – Specifies that an element is a row of cells.

  • table-row-group (in HTML: TBODY) – Specifies that an element groups one or more rows.

  • table-header-group (in HTML: THEAD) – Like table-row-group, but wherever it occurs in the table, it is always displayed before all other rows and rowgroups (but after any captions). On printed pages, the header group is often repeated on each page, in case the table is too long for one page.

  • table-footer-group (in HTML: TFOOT) – Like table-row-group, but it is always displayed after all other rows and rowgroups (but before captions). Like table-header-group, this element is often repeated at the bottom of all pages if a long table is printed.

  • table-column (in HTML: COL) – Specifies that an element describes a column of cells. Column elements cannot have content, but they may be useful for setting column widths, borders, and backgrounds.

  • table-column-group (in HTML: COLGROUP) – Specifies that an element groups one or more columns.

  • table-cell (in HTML: TD, TH) – Specifies that an element represents a table cell.

  • table-caption (in HTML: CAPTION) – Specifies a caption for the table.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


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