start page | rating of books | rating of authors | reviews | copyrights

Dynamic HTML: The Definitive Reference, 2rd Ed.Dynamic HTML: The Definitive ReferenceSearch this book

9.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 be behaving 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 is an empty string.

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 8 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.



Library Navigation Links

Copyright © 2003 O'Reilly & Associates. All rights reserved.