HTML Tables
RFC 1942

Document Type RFC - Historic (May 1996; No errata)
Obsoleted by RFC 2854
Last updated 2013-03-02
Stream IETF
Formats plain text pdf htmlized bibtex
Stream WG state (None)
Document shepherd No shepherd assigned
IESG IESG state RFC 1942 (Historic)
Consensus Boilerplate Unknown
Telechat date
Responsible AD (None)
Send notices to (None)
Network Working Group                                         D. Raggett
Request for Comments: 1942                                           W3C
Category: Experimental                                          May 1996

                              HTML Tables

Status of this Memo

   This memo defines an Experimental Protocol for the Internet
   community.  This memo does not specify an Internet standard of any
   kind.  Discussion and suggestions for improvement are requested.
   Distribution of this memo is unlimited.

Abstract

   The HyperText Markup Language (HTML) is a simple markup language used
   to create hypertext documents that are portable from one platform to
   another. HTML documents are SGML documents with generic semantics
   that are appropriate for representing information from a wide range
   of applications. This specification extends HTML to support a wide
   variety of tables. The model is designed to work well with associated
   style sheets, but does not require them. It also supports rendering
   to braille, or speech, and exchange of tabular data with databases
   and spreadsheets. The HTML table model embodies certain aspects of
   the CALS table model, e.g. the ability to group table rows into
   thead, tbody and tfoot sections, plus the ability to specify cell
   alignment compactly for sets of cells according to the context.

Table of Contents

   Recent Changes  ................................................. 1
   Brief Introduction  ............................................. 2
   Design Rationale  ............................................... 5
   Walkthrough of the Table DTD  ................................... 8
   Recommended Layout Algorithms  ................................. 23
   HTML Table DTD  ................................................ 26
   References  .................................................... 29
   Security Considerations  ....................................... 30
   Author's Address  .............................................. 30

Recent Changes

   This specification extends HTML to support tables. The table model
   has grown out of early work on HTML+ and the initial draft of HTML3.
   The earlier model has been been extended in response to requests from
   information providers for improved control over the presentation of
   tabular information:

Raggett                       Experimental                      [Page 1]
RFC 1942                      HTML Tables                       May 1996

   *   alignment on designated characters such as "." and ":"
       e.g. aligning a column of numbers on the decimal point

   *   more flexibility in specifying table frames and rules

   *   incremental display for large tables as data is received

   *   the ability to support scrollable tables with fixed headers plus
       better support for breaking tables across pages for printing

   *   optional column based defaults for alignment properties

   In addition, a major goal has been to provide backwards compatibility
   with the widely deployed Netscape implementation of tables. A
   subsidiary goal has been to simplify importing tables conforming to
   the SGML CALS model. The latest draft makes the ALIGN attribute
   compatible with the latest Netscape and Microsoft browsers. Some
   clarifications have been made to the role of the DIR attribute and
   recommended behaviour when absolute and relative column widths are
   mixed.

   A new element COLGROUP has been introduced to allow sets of columns
   be grouped with different width and alignment properties specified by
   one or more COL elements. The semantics of COLGROUP have been
   clarified over previous drafts, and RULES=BASIC replaced by
   RULES=GROUPS.

   The FRAME and RULES attributes have been modified to avoid SGML name
   clashes with each other, and to avoid clashes with the ALIGN and
   VALIGN attributes. These changes were additionally motivated by the
   desire to avoid future problems if this specification is extended to
   allow FRAME and RULES attributes with other table elements.

A Brief Introduction to HTML Tables

   Tables start with an optional caption followed by one or more rows.
   Each row is formed by one or more cells, which are differentiated
   into header and data cells. Cells can be merged across rows and
   columns, and include attributes assisting rendering to speech and
   braille, or for exporting table data into databases. The model
   provides limited support for control over appearence, for example
   horizontal and vertical alignment of cell contents, border styles and
   cell margins. You can further affect this by grouping rows and
   columns together. Tables can contain a wide range of content, such as
   headers, lists, paragraphs, forms, figures, preformatted text and
   even nested tables.

Raggett                       Experimental                      [Page 2]
RFC 1942                      HTML Tables                       May 1996
Show full document text