A.1 Changes between HTML 3.2 and HTML 4.0
A.1.1 Changes to elements
New elements
The new elements in HTML 4.0 are:
ABBR,
ACRONYM,
BDO,
BUTTON,
COL,
COLGROUP,
DEL,
FIELDSET,
FRAME,
FRAMESET,
IFRAME,
INS,
LABEL,
LEGEND,
NOFRAMES,
NOSCRIPT,
OBJECT,
OPTGROUP,
PARAM,
S
(deprecated),
SPAN,
TBODY,
TFOOT,
THEAD,
and
Q.
The following elements are
deprecated:
APPLET,
BASEFONT,
CENTER,
DIR,
FONT,
ISINDEX,
MENU,
STRIKE,
and
U.
The following elements are obsolete: LISTING,
PLAINTEXT, and XMP.
For all of them, authors should use the
PRE
element instead.
A.1.2 Changes to attributes
- Almost all attributes that specify the presentation of an HTML
document (e.g., colors, alignment, fonts, graphics, etc.) have been deprecated in favor of style
sheets. The list of attributes
in the appendix indicates which attributes have been deprecated.
- The id and class attribute allow authors to assign name and class
information
to elements for style sheets, as anchors, for scripting, for object
declarations, general purpose document processing, etc.
A.1.3 Changes for accessibility
HTML 4.0 features many changes to promote
accessibility,
including:
- The title attribute may now
be set on virtually
every element.
- Authors may provide long descriptions of tables (see the summary attribute), images and frames (see
the longdesc attribute).
A.1.4 Changes for meta data
Authors may now specify
profiles
that provide explanations about meta data specified with the
META
or
LINK
elements.
A.1.5 Changes for text
- New features for internationalization allow
authors to specify text direction and language.
- The INS and DEL
elements allow authors to mark up changes in their documents.
- The ABBR and ACRONYM elements allow authors to mark up
abbreviations and acronyms in their documents.
A.1.6 Changes for links
- The id attribute makes any element the
destination anchor of a link.
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 extended in response to requests from
information
providers as follows:
- Authors may specify tables that may be incrementally displayed
as the user agent receives data.
- Authors may specify tables that are more accessible to users
with non-visual user agents.
- Authors may specify tables with fixed headers and footers. User
agents may take advantage of these when scrolling large tables or
rendering tables to paged media.
The HTML 4.0 table model also satisfies requests for optional
column-based
defaults for alignment properties, more flexibility in specifying table
frames
and rules, and the ability to align on designated characters. It is
expected,
however, that style sheets
will
take
over the task of rendering tables in the near future.
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 compatible with the latest versions of the most popular
browsers.
Some clarifications have been made to the role of the
dir
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.
A.1.8 Changes for images, objects, and
image maps
- The OBJECT element allows
generic inclusion of
objects.
- The IFRAME and OBJECT elements allow authors to create
embedded documents.
- The alt attribute is required on the IMG and AREA elements.
- The mechanism for creating image maps now
allows
authors to create more accessible image maps. The content model of the MAP element has changed for this reason.
This specification introduces several new attributes and elements that
affect
forms:
- The accesskey attribute
allows authors to specify direct keyboard access to form controls.
- The disabled attribute
allows authors to make a form control initially insensitive.
- The readonly attribute,
allows authors to prohibit changes to a form control.
- 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, in combination with scripts, allow form providers
to
verify user-entered data.
- The BUTTON element and INPUT with type set to "button" can be used in
combination with scripts to
create richer forms.
- The OPTGROUP element allows
authors to group menu options together in a SELECT, which is particularly important for
form accessibility.
- Additional changes for internationalization.
A.1.10 Changes for style sheets
HTML 4.0 supports a larger set of
media descriptors
so
that
authors may write device-sensitive style sheets.
A.1.11 Changes for frames
HTML 4.0 supports frame documents and inline frames.
A.1.12 Changes for scripting
Many elements now feature
event
attributes that may be coupled with scripts; the script is executed
when
the event occurs (e.g., when a document is loaded, when the mouse is
clicked,
etc.).
HTML 4.0 integrates the recommendations of
[RFC2070]
for the internationalization of HTML.
However, this specification and
[RFC2070]
differ as follows:
This section describes how this version of the HTML 4.0 specification
differs
from the previous version released on 18 December 1997.
A.2.1 Errors that were corrected
- Section 2.1.1
- "http://www.w3.org/TR/PR-html4/cover.html" was said to designate
the current HTML specification. The current HTML specification is
actually at http://www.w3.org/TR/REC-html40.
- Section 7.5.2
- The hypertext link on name was
incorrect. It now links to types.html#type-name.
- Section 7.5.4
- href was listed as an attribute of the DIV and SPAN elements. It is not.
- Section 7.5.6
- A P element was used in the example. It is
invalid in ADDRESS.
- Section 8.1
- In the first example, which reads "Her super-powers were the
result...", there was an extra double quote mark before the word "Her".
- Section 9.3.4
- The attribute width was not noted as deprecated.
- Section 11.2.4,
"Calculating the width of columns"
- The sentence "We have set the value of the align attribute in
the third column group to 'center'" read "second" instead of "third".
- Section 11.2.6,
"Cells that span several rows or columns"
- The second paragraph read "In this table definition, we specify
that the cell in row four, column two should span a total of three
columns, including the current row." It now ends "...including the
current column."
- Section 13.2
- The sentence beginning "User agents must render alternate text
when they cannot support ..." read "next", instead of "text".
- Section 13.6.2
- The last sentence of the second paragraph applied to both the IMG and INPUT elements. However, the ismap attribute is not defined for INPUT. The sentence now only applies to IMG.
- Section 14.2.3
- The title attribute for the STYLE element was not listed as an attribute
defined elsewhere.
- Section 14.3.2
- The second example set title="Compact". It now
sets title="compact".
- Section 15.1.2
- The sentence ending "the align attribute." read "the align element."
- Section
15.1.3.2
- The CSS style rule "BR.mybr { clear: left }" was incorrect,
since it refers to the class "mybr" and not the id value. The correct
syntax is: "BR#mybr { clear: left }".
- Section 16
- All the examples containing a Document Type Declaration used
something like "THE_LATEST_VERSION_/frameset.dtd" or
"THE_LATEST_VERSION_" as the system identifier for the Frameset DTD.
They now use "http://www.w3.org/TR/REC-html40/frameset.dtd" instead.
- Section 16.3
and Section 16.3.1
- The second example of 16.3 and the example of 16.3.1 used the
wrong DTD; they now use the Transitional DTD.
- Section 17.5
- In "attributes defined elsewhere" for the BUTTON element, id, class, lang, dir, title, style, and tabindex were missing. Also, usemap has been removed.
- Section 17.6/17.6.1
- The "attributes defined elsewhere" for OPTION and OPTGROUP mistakenly listed onfocus, onblur, and onchange. The "attributes defined elsewhere"
section was missing for the SELECT element (please see the DTD for the
full list of attributes).
- Section 17.9.1
- The tabindex attribute was
said to be defined for the LABEL element. It is
not.
- Section 17.12.2
- The sentence "The following elements support the readonly attribute: INPUT and TEXTAREA." read "The following elements
support the readonly attribute: INPUT, TEXT, PASSWORD, and TEXTAREA."
- Section
18.2.2,
"Local declaration of a scripting language"
- The first paragraph read: "It is also possible to specify the
scripting language in each SCRIPT element via the type
attribute. In the absence of a default scripting language
specification, this attribute must be set on each SCRIPT element." Since the type attribute is required for the SCRIPT element, this paragraph now reads:
"The type attribute must be specified for
each SCRIPT element instance in a document. The
value of the type attribute for a SCRIPT element overrides the default
scripting language for that element."
- Section 24.2.1
and
file HTMLlat1.ent
- The comment for the character reference "not" read "=
discretionary hyphen". This has been removed.
The FPI in comment read "-//W3C//ENTITIES Full Latin 1//EN//HTML",
instead this is now "-//W3C//ENTITIES Latin1//EN//HTML".
- Section 24.3.1
and
file HTMLsymbol.ent
- The FPI in comment read "-//W3C//ENTITIES Symbolic//EN//HTML",
instead this is now "-//W3C//ENTITIES Symbols//EN//HTML".
- Section A.1.1, "New elements"
(previously A.1.1) and Section A.1.1, "Deprecated
elements" (previously A.1.2)
- The S element which is deprecated
was
listed as part of the changes between HTML 3.2 and HTML 4.0. This
element was not actually defined in HTML 3.2. It is now in
the
new elements list.
- Section A.1.3 (previously A.3)
- The longdesc attribute
was said to be specified for tables. It is not. Instead, the summary attribute allows authors to give
longer descriptions of tables.
- Section B.4
- The sentence "You may help search engines by using the LINK element with rel="start" along
with the title attribute, ..." read "You may help
search engines by using the LINK element with rel="begin"
along with a TITLE, ..." The same
stands for the companion
example.
- Section B.5.1
- The sentence "This can be altered by setting the width attribute of the TABLE element." read "This can be altered by
setting the width-TABLE attribute of the TABLE element."
- Section B.5.2
- The sentence "Rules for handling objects too large for a column
apply when the explicit or implied alignment results in a situation
where the data exceeds the assigned width of the column." read "too
large for column". The meaning of the sentence was unclear since it
referred to "rules" governing an error condition; user agent behavior
in error conditions lies outside the scope of the specification.
- Index of attributes
- The href attribute for the BASE element was marked as deprecated.
It
is not. However, it is not defined in the Strict DTD either.
The language attribute for
the SCRIPT element was not marked as deprecated.
It
is now, and it is no longer defined in the Strict DTD.
A.2.2 Minor typographical errors that were
corrected
- Section 2.1.3
- "Relative URIs are resolved ..." was "Relative URIsare resolved
...".
- Section 2.2.1
- The second word "of" was missing in "Despite never receiving
consensus in standards discussions, these drafts led to the adoption of
a range of new features."
- Section 3.3.3
- The sentence "Element types that are designed to have no content
are called empty elements." contained one too many "elements". The word
"a" was missing in the sentence "A few HTML element types use an
additional SGML feature to exclude elements from a content model".
Also, in list item two, a period was missing between "optional"
and "Two".
- Section 3.3.4
- In the section on "Boolean attributes", the sentence that begins
"In HTML, boolean attributes may appear in minimized ..." included a
bogus word "be".
- Section 6.3
- The sentence beginning "For introductory information about
attributes, ..." read "For introductory about attributes, ...".
- Section 6.6
- In the first sentence of the section on Pixels, "is an integer"
read "is integer".
- Section 7.4.1
- The first word "The" was missing at the beginning of the section
title.
- Section 7.4.4
- The last word "a" was missing in the sentence "The meaning of a
property and the set of legal values for that property should be
defined in a reference lexicon called profile."
- Section 7.5.2
- "Variable déclarée deux fois" read "Variable
déclaré deux fois".
- Section 9.2.2
- The language of the quotations was "en" instead of "en-us",
while in British English, the single quotation marks would delimit the
outer quotation.
- Section 9.3.2
- In the first line, the sixth character of "
" was the
letter 'O' instead of a zero.
- Section 10.3.1
- "(they are case-sensitive)" read "(the are case-sensitive)".
- Section 12.1.1
- In the sentence beginning "Note that the href attribute in each
source ..." the space was missing between "href" and "attribute".
- Section 12.1.2
- The sentence "Links that express other types of relationships
have one or more link types specified in their source anchors." read
"Links that express other types of relationships have one or more link
type specified in their source anchor."
- Section 12.1.5
- The second paragraph reads "the hreflang attribute provides user
agents about the language of a ..." It should read "the hreflang
attribute provides user agents with information about the language of a
..."
- Section 13.3.2
- In the sentence beginning "Any number of PARAM elements may appear in the content of
an OBJECT or APPLET element, ..." a space was missing
between "APPLET" and "element".
- Section 14.2.2
- There was a bogus word "style" at the beginning of the sentence
"The style attribute specifies ..."
- Section 17.2
- In "Those controls for which name/value pairs are submitted are
called successful controls" the word "for" was missing.
- Section 17.10
- There was a bogus word "/samp" just before section 17.11.
- Section 17.11
- The first sentence read, "In an HTML document, an element must
receive focus from the user in order to become active and perform their
tasks" (instead of "its" tasks).
- Section 18.2.2
- Just before section 18.2.3, the sentence that includes "a name
attribute takes precedence over an id if both are set." read "over a id
if both are set.".
- Section 19.1
- The section title read "document Document Validation". It now is
"Document Validation".
- Section 21
- The FPI for the Transitional HTML 4.0 DTD was missing a closing
double quote.
- Section B.5.1/B.5.2
- This sections referred to a non-existent cols
attribute. This attribute is not part of HTML 4.0. Calculating the
number of columns in a table is described in section Section 11.2.4.3, in
the
chapter on tables. In sections B.5.1 and B.5.2, occurrences of cols
have been replaced by "the number of columns specified by the COL and COLGROUP elements".
- Section B.5.2
- In the sentence "The values for the frame attribute have been
chosen to avoid clashes with the rules, align and valign attributes." a
space was missing between "the" and "frame" and the last attribute was
"valign-COLGROUP".
- Section B.10.1
- The last sentence read "Once a file is uploaded, the processing
agent should process and store the it appropriately." "the it" was
changed to "it".
- Index of Elements
- "strike-through" in the description of the S element read "sstrike-through".