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


Common Proprietary HTML Extensions

Netscape and Microsoft have implemented a number of proprietary HTML elements, many of which have not been incorporated into the HTML standard. Some of these (e.g., WBR, NOBR) are widely adopted by other browser vendors, while others (e.g., BLINK, MARQUEE) are less widely supported and are unlikely to be supported in the future. These elements can be useful in certain contexts, but you should always be aware of their lack of universality. If you do use them, be sure to check your documents on several different browsers, to make sure that users will see the content you intend.

BGSOUND Element: Inline Audio Snippets (Internet Explorer Only)

Usage: <BGSOUND>
Can Contain: empty
Can Be Inside: HEAD
Attributes: CLASS, ID, LANG, TITLE, BALANCE, LOOP, SRC, VOLUME

BGSOUND is a HEAD-level element that references an audio file to be played as the document is being viewed—the URL location of the audio file is specified by the mandatory SRC attribute. By default, the sound is loaded and played once—this can be modified by the LOOP attribute. For example, LOOP=“10” instructs the browser to play the sound file 10 times before stopping. The attributes, in detail, are:

BALANCE=“number” (optional; Internet Explorer 4 only) Specifies the volume balance between the left and right speakers. The allowed values range from -10,000 to +10,000, with the value 0 corresponding to sound balanced between the speakers.
LOOP=“number” (optional) Specifies how often the audio file is looped before play is stopped. The values LOOP=“-1” or LOOP=“infinite” cause the sound file to loop endlessly. The default values is -1.
SRC=“url” (mandatory)Specifies the URL for the audio file. Note that the file should be in one of the supported formats: AIFF (audio/aiff), Sun/Macintosh (audio/au), or WAV (audio/wav).
VOLUME=“number” (optional; Internet Explorer 4 only) Specifies the playing volume for the background sound. Values can lie in the range 10,000 to 0. The value 10,000 corresponds to the maximum possible volume.

The following is an example of BGSOUND.

<BGSOUND SRC=“/project1/sounds/bubbles.wav” LOOP=“-1”>

BGSOUND is not supported by Netscape Navigator, so it should be avoided in documents that must work across multiple browsers. An alternative is to use EMBED or OBJECT—Netscape Navigator and Internet Explorer can both play audio files using a plugin, so that invoking audio playback by this approach ensures maximum utility of the page.

BLINK Element: Blinking Text (Netscape Navigator Only)

Usage: <BLINK> ... </BLINK>
Can Contain: Unspecified, probably: characters, character highlighting, A, APPLET, BASEFONT, BR, BUTTON, EMBED, IFRAME, ILAYER, IMG, INPUT, KEYGEN, LABEL, LAYER, MAP, OBJECT, SPACER, SCRIPT, SELECT, TEXTAREA, WBR
Can Be Inside: Unspecified, probably: ADDRESS, BLOCKQUOTE, BODY, CAPTION, CENTER, DD, DIV, DT, FIELDSET, FORM, Hn, LI, MULTICOL, NOEMBED, NOFRAMES, NOLAYER, NOSCRIPT, P, PRE, TD, TH,
character highlighting, A, APPLET, BUTTON, IFRAME, ILAYER, LABEL, LAYER, LEGEND, OBJECT
Attributes: none

BLINK marks the enclosed text as blinking—browsers generally flash this text on and off. BLINK affects only enclosed text and has no effect on enclosed images, FORM input elements (although regular text inside a FORM can be rendered as blinking), or list item markers (bullets, numbers, etc.).

In principle, you should explicitly mark each block of text (paragraph, list item, etc.) for blinking, as opposed to marking large blocks (several paragraphs and lists) of the document. In practice, you can use a single <BLINK> tag to mark an entire document as blinking and thereby drive your readers crazy.

The slightest mention of the BLINK element causes formal HTML language designers to pull out crosses, garlic, and/or wooden stakes and begin chanting, in rising voices, “Evil, evil, horrible evil!!” It is, therefore, unlikely that BLINK will be integrated into the official HTML specification.

For obvious reasons, there are no BLINK examples in the figures.

EMBED Element: Embed an Arbitrary Data Object

Usage: <EMBED>
Can Contain: empty
Can Be Inside: Unspecified, probably: ADDRESS, BLOCKQUOTE, BODY, CAPTION, CENTER, DD, DIV, DT, FIELDSET, FORM, Hn, LI, MULTICOL, NOEMBED, NOFRAMES, NOLAYER, NOSCRIPT, P, PRE, TD, TH, character highlighting, A, APPLET, BUTTON, IFRAME, ILAYER, LABEL, LAYER, LEGEND, OBJECT
Attributes: (CLASS, ID, STYLE: Netscape Navigator 4 and Internet Explorer 4 only), (onBlur, onFocus: Internet Explorer 4 only),
ALIGN, BORDER, FRAMEBORDER, HEIGHT, HIDDEN, HSPACE, NAME, PALETTE, PLUGINSPAGE, ( PLUGINSURL Netscape Navigator 4 only) SRC, TYPE, VSPACE, WIDTH, P_NAME (arbitrary name value)

EMBED specifies an arbitrary data object to be embedded within the document—for example an audio file, a special-format graphic file, or a spreadsheet. Display of embedded objects requires extra functionality on a browser, usually provided by browser plugins—these are product- or data-format-specific modules that are loaded into the browser whenever the corresponding data format is accessed.

The NOEMBED element provides an HTML alternative to the embedded data, for use by browsers that do not support the EMBED element or that cannot process the specified embedded data type. The use of NOEMBED is described later in this section.


NOTE: EMBED Being Replaced by OBJECT

The EMBED element design has many problems, in particular its violation of important SGML syntax rules, and the inability to specify alternative or preferred plugins for handling a given data type. EMBED will very soon be replaced by the more sophisticated OBJECT element, described later in this chapter.


Note that the HTML 4 CLASS, ID, and LANG attributes are supported by Netscape Navigator 4 and Internet Explorer 4. This allows for binding of style sheet properties to EMBED elements.

Some examples of plugins were shown in Example 11 in Chapter 2. The attributes supported by EMBED are:

ALIGN=“absbottom,” “absmiddle,” “baseline,” “bottom,” “left,” “middle,” “right,” “top” (optional) Specifies the alignment of the embedded object on the page. The meanings are the same as for the IMG element, as described in Chapter 6.
BORDER=“number” (optional; not supported) Specifies the size, in pixels, of the border to be drawn around the displayed object. The default is to have no border. Although defined in the Netscape documentation, there are no browsers that currently support this attribute.
FRAMEBORDER=“no,” “yes” (optional; not supported)Specifies whether or not a border should be drawn around the displayed object: The default value is “no.” Although defined in the Netscape documentation, there are no browsers that currently support this attribute.


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.