|
To access the contents, click the chapter and section titles.
HTML 4.0 Sourcebook
TYPE=string (optional) Specifies the MIME type of the data referenced by the DATA attribute. This is a hint to the browsera browser can in principle use this information to avoid downloading data types it does not support. In practice, however, a browser cannot definitively know the type until the data are actually accessed. CLASSID can reference the code to properly handle the indicated data type. If CLASSID is absent, then TYPE is used to select an appropriate data handler. USEMAP=string (optional; not currently supported)Specifies the URL of a clientside imagemap MAP element, as described in Chapters 3 and 6. This gives OBJECT the same functionality as clientside imagemapped IMG elements. VSPACE=length (optional) Specifies the desired vertical spacing to leave above and below the object, in pixels. WIDTH=length (mandatory)Specifies the desired width of the box enclosing the object, in pixels. In principle, WIDTH can be used to rescale the object to the specified width. Whether or not this is possible depends on the object being embedded. PARAM Element: Parameter Inside an OBJECT
The advanced OBJECT model supports extra attributes to PARAM elements inside an OBJECT. VALUETYPE specifies the type of the string being assigned to VALUE, and can take the three possible values data, object, or ref. Data means that the VALUE string is data to be passed to the object, and that HTML entity and character references must be replaced by the referenced characters before the string is sent. The value object means that the assigned string is a reference pointing to another (possibly running) OBJECT within the same document. The value ref indicates that the value is a proper URL referencing a resource. If VALUETYPE=ref, then the optional TYPE attribute can be used to specify the MIME type of the referenced object.
Netscape LAYER ElementsWith Navigator 4, Netscape introduced three proprietary HTML elements: LAYER, ILAYER, and NOLAYER. These elements allow for layered content on the displayed pagethat is, for content that appears above the standard page, rather like a floating block of text or graphic. In the Netscape approach, such floating content is defined by the LAYER or ILAYER elements (the two elements define the different ways in which elements can float, as discussed below), or within an external document referenced by a SRC attribute of a LAYER or ILAYER. The NOLAYER element was introduced as a container for markup to be displayed by browsers that do not understand LAYER elements. Thus, NOLAYER is similar in purpose to NOFRAMES, NOSCRIPT, and NOEMBED. Just after Netscape introduced the layer elements, the World Wide Web Consortium introduced a style sheet approach for element positioning and zindexingthat is, for elements positioned above the plane of the regular HTML document. This is equivalent to the functionality provided by layer elements, and is now the recommended mechanism for creating layers in HTML documents. At present, Netscape Navigator 4 supports both layer elements and CSS positioning, while Internet Explorer 4 and other browsers do not support LAYER elementsthus, you must use CSS if you wish your pages to work on nonNetscape browsers. However, many Netscape (and other) documents are composed using the layer elements, so it is important to understand the elements and how they work. In addition, there are some aspects of the layer approach (for example, using SRC to reference external content for the layer) that are not possible with CSS. LAYER and ILAYER: Absolutely and Relatively Positioned LayersThe different layers are defined by LAYER and ILAYER elements. A LAYER element defines an absolutely positioned layersuch layers are positioned independent of the location of the LAYER element within the HTML document. In addition, layers defined by LAYER do not affect the flow of the nonlayered text in the rest of the document. Figure 7.24 shows one such layer, here consisting of the text ABSOLUTE in bold, light red (which appears, in this figure, as light gray) text. Note how, in Figure 7.25, this layer is physically positioned where it would have appeared if it had not been in a layerthis is simply the default placement for a positioned layer, should no specific position be specified. Note also that this layer does not affect the positioning of the other text in the paragraphthe regular document text continues underneath the layer, as if the layer were not present. Note that the background of the layer element is transparent, and the text of the underlying window shows through. This is the default behavior of a layer element. However, layer elements can be assigned background colors (BGCOLOR) or images (BACKGROUND), which are opaque and fully obscure the underlying content. ILAYER, or inflow layer, defines relatively positioned contentsuch elements appear as part of the regular flow of the text, and are not separated from it. Figure 7.24 illustrates a simple example ILAYER element, here containing the single word RELATIVE in bold, light red text (light gray in the figure). Note how the text appears inline with the regular content, and the surrounding text is displaced from the region occupied by the layer. Figures 7.24 and 7.25 illustrate the default positions of layersthat is, the positions occupied by the layers if no positioning information is given. Most of the time, layer elements are displaced to positions defined by the LEFT, TOP, PAGEX, or PAGEY attributes. Figure 7.26 illustrates this positioning, applied to the document in Figure 7.24here, both elements are positioned to start at TOP=50 and RIGHT=50, which define the position of the layers, relative to an upper lefthand corner, in pixels (percentage values are also supported). The location of this upper lefthand corner depends on the type of the element, as illustrated in the browser rendering of this document in Figure 7.27note the important difference between the resulting positions of the LAYER and ILAYER. The LAYER element is positioned 50 pixels down and 50 pixels in from the upperleft corner of the browser window, whereas the ILAYER element is positioned 50 pixels down and 50 pixels in from the position it occupied as an inline element. This illustrates the difference between absolute positioning of a LAYERabsolutely positioned relative to the enclosing frame and relative positioning of an ILAYERpositioned relative to the position the element would have if it were not positioned.
|
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. |