Section 2.3. Default Property Values


2.3. Default Property Values

Many property listings provide what appear to be explicit default values, but this can be deceiving. The trend in recent browsers is for an element object property to return an empty string when the property reflects an HTML attribute not explicitly assigned in the source code. But an empty string is equally misleading, because the element may behave according to a default specification, even when no attribute is assigned. The align property of a block-level element is a good example. Unless instructed otherwise, the element usually behaves as if its align property were set to left, yet the default property returns as an empty string because no align attribute is explicitly set in the markup.

In these cases, the listings in this chapter display the default values under which the element object behaves. This choice simply provides a shortcut so that when you see a list or range of possible property values, you don't have to look up the corresponding attribute in Chapter 1 to find the HTML default value. Where the default value is listed as "None," this means that there is no default HTML behavior and the default value is, indeed, an empty string.




Dynamic HTML. The Definitive Reference
Dynamic HTML: The Definitive Reference
ISBN: 0596527403
EAN: 2147483647
Year: 2004
Pages: 120
Authors: Danny Goodman

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net