Changes between HTML 3.2 and HTML 4.0
Changes to elements
New elements
The new elements in this version of HTML are Q, INS, DEL, ACRONYM, LEGEND, COLGROUP,
BUTTON, and
FIELDSET.
Deprecated elements
The following elements are now deprecated: ISINDEX, APPLET, CENTER, FONT, BASEFONT, STRIKE,
S, U, DIR, and MENU.
Obsolete elements
The following elements are now obsolete: XMP, PLAINTEXT, and
LISTING. For all of them, you should use
the PRE element instead.
The HTML 4.0 table model has grown out of early work on HTML+ and
the initial draft of HTML3.0. The earlier
model has been been extended in response to requests from information
providers for improved control over the presentation of tabular
information:
- The ability to align on designated characters such as "." and":"
(e.g., aligning a column of numbers on the decimal point).
- The need for more flexibility in specifying table frames and rules.
- The need for incremental display of 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.
- The need for 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. Another goal has been to simplify importing tables
conforming to the SGML CALS model. The latest draft makes the align attribute attribute compatible with the
latest versions of the most popular browsers. Some clarifications
have been made to the role of the dir
attribute attribute and recommended behavior when absolute and
relative column widths are mixed.
A new element, COLGROUP, has been
introduced to allow sets of columns to 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 style attribute is included as a
means for extending the properties associated with edges and interiors
of groups of cells. For instance, the line style: dotted, double,
thin/thick etc; the color/pattern fill for the interior; cell margins
and font information. This will be the subject for a companion specification
on style sheets.
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.
The forms specified in HTML 3.2 have the following problems:
- There is no provision for keyboard shortcuts for particular actions,
for access keys for driving menus, etc.
- Although form controls can be made insensitive dynamically, they cannot
be declared as such at initialization time.
- Along the same line form controls, such as form fields, cannot be made
"read only".
- Labels for radio buttons and checkboxes are not sensitive, i.e.,
clicking on a label text doesn't effect the button state.
- There is no way to markup groups of related form fields in a way that
effectively supports browsing with speech-based user agents.
- There is no provision for checking values as they are entered into form
fields. All checking is done at the server when the form's contents are
submitted.
- Nothing is provided to specify what type of data file is expected when
the user is asked to submit files.
- Forms can only contain the two buttons submit and reset.
- There is no way to specify what character sets the server issuing
a form can handle.
To solve these problems this specification introduces several new
attributes and elements.
- The accesskey attribute provides for
specifying direct keyboard access to form fields.
- The disabled attribute allows
form providers to make a form control initially insensitive.
- And with the additional attribute readonly, authors can prohibit changes to a
form field.
- The LABEL element associates a label
with a particular form control. The FIELDSET element groups related fields together
and, in association with the LEGEND
element, can be used to name the group. Both of these new elements
allow better rendering and better interactivity. Speech-based browsers
can better describe the form and graphic browsers can make labels
sensitive.
- A new set of attributes, including onchange-INPUT, in association with support for
scripting languages, allows form providers to verify user-entered data.
- The INPUT element has a new attribute
accept that allows authors to specify a
list of valid media types or type patterns for the input.
- The new BUTTON element can be used to
make richer forms with more than just a submit and a reset button.
- The FORM element includes the attribute
accept-charset, modeled on the HTTP
"Accept-Charset" header (see [RFC2068]). This attribute
(first proposed in [RFC1867]) may be used to
specify a list of character sets acceptable to the server.