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

Grouping Columns and Rows

So far, most of the markup you’ve seen is actually the basic table elements used for larger chunks of text and images—that’s most of what table-based layout is about. There are a few more elements to discuss, however, and you’ll find that they’re important as your tables grow in complexity. These new elements will enable you to group your rows, defining different portions of the table (and hence the page). Other elements enable you to better group and define your columns, as you’ll see in this section.

Table Row Groupings

Table row groupings are reasonably straightforward. They’re designed to help you group your rows into different sections of the table, just as you group different elements into a head and body in an HTML document. In this case, the elements are <thead>, <tfoot>, and <tbody>. The idea behind these elements is to enable a Web browser or other application to consider the header and footer to be separate from the body, so that, for instance, the body of the table can scroll while the header and footer stay in place. Likewise, a browser can decide that the header and footer information on each page of a multi-page table will appear when printed, just like the header and footer of a typical word processing document.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


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