 |
Nancy Cluts
HTML 4.0: What's Changed for Pages in Internet Explorer
Posted July 17, 1998
Download Microsoft Word (.DOC) format of this document (zipped, 15.4K)
HTML 4.0 is now an official World Wide Web Consortium (W3C) Recommendation for use by Web authors and developers. The best source of information about this new version of HTML is the HTML 4.0 specification , but many people either don't have the time or the inclination to slog through a stuffy spec. This article assumes that you are already using HTML 3.2 and you want to know about the differences between versions 3.2 and 4.0, and what level of support for these features Internet Explorer provides.
What's New in HTML 4.0
The new HTML 4.0 Recommendation outlines some key innovations for HTML, including:
- Support for in-line frames (for example, IFRAME) and framesets
- Support for a larger set of media descriptors
(such as tty, screen, handheld, tv, braille) so that authors may write device-sensitive style sheets
- Script- and object-support. HTML 4.0 provides a standard mechanism for using the <OBJECT> tag to embed media-objects -- such as video, images, and sounds -- in HTML documents
- Enhanced support for forms
- Support for the ID attribute, making any element the destination anchor of a link.
- Support for elements with event attributes
- Support for profiles
that provide information about data specified with the META or LINK elements
- Enhanced table support. The new table model
provides more control over the layout and structure of tables. You can group columns, and designers can now recommend column widths for displaying table data as it arrives, so the table can be rendered "on the fly" as data comes in
- Internationalization support. HTML 4.0 supports the ISO/IEC:10646 standard
as the document character set for HTML. This standard deals with key internationalization issues, such as representation of international characters, text direction, and punctuation.
- Accessibility
for users with disabilities. By using style sheets, you can more easily provide alternate descriptions for images (both textual and speech) for non-visual browsers. Labels can be used for form fields as well as for hierarchical groupings for form fields. You can also associate a longer text description with an HTML element.
Changes Between HTML 3.2 and HTML 4.0
An exhaustive list of the changes between HTML 3.2 and HTML 4.0 can be found in the appendix of the HTML 4.0 spec. Here, I'll outline some of the basic areas of change. Refer to the spec for proper syntax.
Changes to Elements
Changes include elements that are new, deprecated, and obsolete. A deprecated element or attribute is one that is superseded by newer constructs and may become obsolete in future versions of HTML. You should support deprecated elements in the interest of backward compatibility. The spec includes examples that show you how to avoid using deprecated elements. An obsolete element or attribute is one that is not guaranteed to be supported by browsers that support the HTML 4.0 specification.
The following are the new elements for HTML 4.0:
- New phrase elements: ABBR to specify an abbreviation and ACRONYM to specify an acronym.
- BDO to override the default bi-directional attribute.
- An element, BUTTON, that provides richer rendering, that is, support for content associated with the button as well as image.
- The COL element, allowing you to group together attributes for table columns. This grouping is for attributes only -- it does not group items together structurally. Use the new COLGROUP element to create a specific column group.
- The elements INS and DEL, allowing you to specify content that has been inserted or deleted (for versioning).
- The FIELDSET element allowing you to group related controls and labels in conjunction with the new LEGEND element (allowing you to assign a caption to the FIELDSET).
- New elements for frames: FRAME, to define the content and appearance of a single frame; FRAMESET, allowing you to lay out your page into rectangular spaces; IFRAME, allowing you to insert a frame within a text block; and NOFRAMES, allowing you to specify content that should be displayed when frames are not being displayed.
- The LABEL element, allowing you to associate text with a control.
- The NOSCRIPT element, allowing you to provide alternate content when script is not being used.
- The OBJECT element, allowing generalized inclusion of objects.
- The OPTGROUP element, allowing you to group options logically.
- The PARAM element, allowing you to specify the parameters for an object at run time.
- The SPAN element, allowing you to specify structure for content inline.
- New table elements: TBODY, to specify the table body; TFOOT, to specify the table footer; and THEAD, to specify the table header.
- The Q element, used to specify short quotations (BLOCKQUOTE is used for long quotations).
Note: The ABBR, BDO, and OPTGROUP elements are not currently supported in Internet Explorer.
Deprecated elements
Elements that have been deprecated are:
APPLET (use OBJECT instead)
BASEFONT
CENTER (use the DIV element with the align attribute set to "center" instead)
DIR (use UL instead)
FONT
ISINDEX (use the INPUT element instead)
MENU (use UL instead)
S
STRIKE
U
Obsolete elements
Now obsolete are the elements:
LISTING
PLAINTEXT
XMP
HTML authors should use the PRE element instead. The PRE element is used to specify preformatted text.
Changes to Attributes
The biggest change regarding attributes is that many have been deprecated. Instead, the HTML 4.0 specification recommends that style sheets be used where possible. The appendix to the specification includes a list of the attributes that have been deprecated in a handy-dandy table (look for the letter 'D' designating whether the attribute has been deprecated).
Two attributes that have not been deprecated, id and class, are supported in HTML 4.0 to allow you to assign name and class information to elements.
Changes for Tables
There have been significant changes to the table model for HTML 4.0, including the capability for incremental rendering, enhanced accessibility, and fixed headers and footers. HTML 4.0 also provides optional defaults for table columns, and the ability to align table columns on specified characters. Although there have been enhancements for rendering tables, authors are expected to use style sheets in the future for rendering tables. See the specification for detailed information about the changes to tables for HTML 4.0.
Changes for Forms
Forms support several new attributes, allowing the author to specify direct keyboard access to form controls (accesskey), disabled forms (disabled), and read-only forms (readonly). In addition, authors can take advantage of the LABEL element to associate a label with a form control, and the FIELDSET and LEGEND elements to field groups together and provide captions. You can use the new attributes within scripts in order to verify data that the user has entered. You can also take advantage of the new BUTTON element. See the specification for more detailed information about the changes to forms for HTML 4.0.
HTML 4.0 Support in Internet Explorer
Internet Explorer 4.0 provides excellent support for the HTML 4.0 specification recommended by the W3C. Internet Explorer 3.0 provided support for some of these features, such as FRAMESETs, IFRAMEs, table enhancements and the OBJECT and SCRIPT elements. In Internet Explorer 4.0, you can take advantage of the new features provided by HTML 4.0.
One cool new element is LABEL. Before this element was specified, you couldn't associate text with a control on the screen. For example, if you had a Web page that contained a group of radio buttons, the user would have to click on the button itself to select it -- rather than being able to click on the text. That is because the text was not officially associated (HTML did not make the connection) with the button.
Another new element in HTML 4.0 supported in Internet Explorer 4.0 is FIELDSET. Using this element, you can more easily structure and organize your forms. As the LABEL element provides the ability to associate text with a control, the FIELDSET element provides the ability to group related controls together. For example, let's say you have a form that contains logical groupings (that is, personal information and business information). In the past, you might provide headings to label each area and that worked okay. With HTML 4.0, you can use the FIELDSET element to actually group those elements together (much like a groupbox in Windows applications).
One of my co-workers was kind enough to supply a neat demo that takes advantage of the FIELDSET, LEGEND, LABEL, and BUTTON (with an IMG) elements. When you run the fieldset.htm file, you will see the following form in the browser:
Other Resources
Other sources of information about HTML 4.0 and Internet Explorer can be found by following the links below:
- Peter Bernard Bremer's HTML Guide
shows support by various browsers.
- Inside DHTML
, a book by Scott Issacs, provides some excellent information about DHMTL. Information about the new HTML 4.0 features is in Chapter 1.
- Microsoft Press Pass
has the Microsoft press release on support for the HTML 4.0 spec in Microsoft Internet Explorer 4.0.
- Books available through Computer Literacy
include:
Instant HTML Programmer's Reference, HTML 4.0 Edition, Second Edition, by Steve Wright
Teach Yourself Web Publishing: With HTML 4 In 14 Days, Second Edition, by Laura Lemay
Creative HTML Design: A Hands-On HTML 4.0 Web Design Tutorial,. by Lynda and William Weinman.
© 1998 Microsoft Corporation. All rights reserved. Terms of use.
|