Click Here!
home account info subscribe login search My ITKnowledge FAQ/help site map contact us


 
Brief Full
 Advanced
      Search
 Search Tips
To access the contents, click the chapter and section titles.

HTML 4.0 Sourcebook
(Publisher: John Wiley & Sons, Inc.)
Author(s): Ian S. Graham
ISBN: 0471257249
Publication Date: 04/01/98

Bookmark It

Search this book:
 
Previous Table of Contents Next


Chapter 7
Advanced HTML—Proprietary Extensions and New Features

Chapter 6 provided an overview of HTML and detailed descriptions of the most commonly implemented, standards-based markup elements. However, there is more to practical HTML authoring than that. Most commercial browsers support popular proprietary extensions, such as EMBED, while some of the newer HTML 4 elements, such as OBJECT, are now being implemented. A Web author needs to know how to use these newer elements, but also needs to be aware of their status—after all, there’s no point using an element if it is not supported by browsers in common use.

This chapter describes these newer HTML features. The topics covered range from proprietary elements, such as FRAME, EMBED, and MARQUEE, to proposed standards-based elements such as OBJECT and SPAN. Also covered are more advanced issues, such as styles sheets, internationalization, and document scripting.

Note that the descriptions of the new elements presented here follow the layout used in Chapter 6, and you are referred there for details. The main difference is in the elements grouped under the name “Character Highlighting.” In Chapter 6, this group consisted of the physical (B, I, U, etc.) and logical (EM, STRONG, CITE, etc.) highlighting elements. In this chapter, the definition is extended to include the appropriate proprietary elements. The revised definition is:

Character highlighting: ABBR, ACRONYM, BDO, CITE, CODE, DFN, EM, KBD, Q, SAMP, STRONG, VAR; and B, BIG, FONT, I, S, SMALL, SPAN, STRIKE, SUB, SUP, TT, U, and BLINK, NOBR, MARQUEE

where the additional, proprietary elements are underlined, and at the end of the list.

As in Chapter 6, the INS and DEL elements are not mentioned in the element descriptions. In general, you can assume that any of the elements mentioned here can be contained within an INS or DEL element.

Chapter Organization

For ease of use, the material in this chapter is divided into twelve sections. These are:

1.  FRAME and Framed Documents. Describes the FRAMESET, FRAME, IFRAME, and NOFRAMES elements used to create framed documents. These elements let a single browser window contain multiple, independent frames, each frame containing a different HTML document. Most—but not all—commercial browsers support these elements. These elements are part of the HTML 4 standard.
2.  Common Proprietary HTML Extensions. Describes other elements currently in common use but not part of the HTML standard. These include the Netscape-specific BLINK, MULTICOL, and SPACER elements; the Microsoft-specific MARQUEE and BGSOUND elements; and the non-standard EMBED, NOBR, and WBR elements. As Netscape Navigator and Microsoft Internet Explorer are the most popular browsers, the section notes cases where an element in not supported by both.
3.  Advanced HTML FORMs. Describes the new BUTTON, FIELDSET, LABEL, LEGEND, and OPTGROUP elements, as well as the form-related attributes, introduced with HTML 4. These elements are not supported by Netscape Navigator 4, but are largely supported by Internet Explorer 4.
4.  Embedding Objects in HTML. Covers the OBJECT element, introduced in HTML 4 and designed to replace and augment the elements APPLET, EMBED, and IMG. This section also covers related changes to A and PARAM. OBJECT is partially supported by Internet Explorer 3 and is more fully (but still incompletely) supported by Netscape Navigator 4 and Internet Explorer 4.
5.  Netscape LAYER Elements. Covers the LAYER, ILAYER, and NOLAYER elements supported by Netscape Navigator 4. These elements allow for floating layers of content that lie “above” the regular page. These elements are only supported by Netscape Navigator 4, and you are best advised not to use them in new applications: Much the same functionality is available via style sheet formatting.
6.  Style Sheets and HTML. Describes the concept behind style sheets and how style sheets are linked to the text of an HTML document. This section also introduces some of the details of the cascading style sheets (CSS) language now being deployed in Web applications. Netscape Navigator 4 and Internet Explorer 4 both support CSS.
7.  Scripting in HTML Documents. Describes the new attributes and elements added to HTML to allow interaction between HTML elements and script programs, and briefly describes the nature of these document scripting languages, using JavaScript as an example. This sections also covers dynamic HTML, as well as the new document object model (DOM).
8.  Internationalization of HTML. A description of the new elements and attributes to be added to HTML in support of non-European languages. These features are not widely supported, but will be incorporated into the next generation of Web browsers.
9.  Fonts and Font Embedding. This section discusses how Netscape and Microsoft now support the distribution of fonts along with documents.
10.  Missing Features: Mathematics. This section discusses the special problems of including mathematical symbols and expressions in HTML documents.
11.  Other Missing Features. This section discusses some of the other obvious missing features of HTML, and describes some efforts underway to resolve these limitations.
12.  References. The references section provides a list of books, URLs, and other resources where you can find additional information on the technologies and languages mentioned in this chapter.

At present, few browsers support the more advanced multilingual or next-generation HTML features, although this situation will soon change. If you want to experiment with these more advanced aspects of HTML, you should obtain the non-commercial emacs-w3, amaya, or grail browsers. Information about these browsers is provided in the references.

FRAME and Framed Documents

With Navigator 2, Netscape introduced a new form of Web page layout, known as a frame document. Such documents use special markup that lets a document author divide the browser window into a number of independent frames, where each frame can contains its own, unique HTML document. In a frame document, the traditional BODY element is replaced by a FRAMESET, which defines the layout of a set of frames within the browser window. The initial content of these frames is defined by FRAME or FRAMESET elements located inside the FRAMESET. FRAME elements within FRAMESET reference an HTML document to be inserted within the frame (and also define certain properties about the frame), while a FRAMESET element within FRAMESET simply divides a frame into additional subframes.

The only other element allowed inside a frame document is NOFRAMES. This nonempty element can contain a BODY element that, in turn, contains regular body content HTML markup. Browsers that understand FRAMESET will load the content referenced by the FRAME elements and will hide any content placed inside the NOFRAMES. On the other hand, browsers that do not understand FRAMESET simply ignore all of the FRAMESET, FRAME, and NOFRAMES tags and take the BODY element and its content as the document to be displayed.

Figure 7.1 shows an example of a frame document, illustrating these basic parts. Figure 7.2 shows the rendering by a frame-capable browser, while Figure 7.3 shows the rendering by a nonframe browser: Note how the latter displays the NOFRAMES content.

An HTML document containing a FRAMESET cannot contain BODY content, other than within NOFRAMES. If you include regular BODY element tags prior to the first FRAMESET element, Netscape Navigator will entirely ignore the FRAMESET elements and will display the NOFRAMES content instead. Internet Explorer 4 behaves in the same way. Unfortunately, Internet Explorer 3 and 4 do the opposite, rendering the framed version even if there is body content ahead of the first frameset. Thus, care must be taken to ensure that a frame document displays properly under both browsers.

Figure 7.1, a simple frame document example (fig7-1.html) with markup that specifies four framed regions—the resulting document is shown in Figure 7.2, while Figure 7.3 shows the same document viewed by a browser that does not understand frames.


Previous Table of Contents Next


Products |  Contact Us |  About Us |  Privacy  |  Ad Info  |  Home

Use of this site is subject to certain Terms & Conditions, Copyright © 1996-2000 EarthWeb Inc.
All rights reserved. Reproduction whole or in part in any form or medium without express written permission of EarthWeb is prohibited. Read EarthWeb's privacy statement.