11.4. ConventionsThe CSS syntax descriptions shown throughout this chapter adhere to the following guidelines:
The "Applies To" category advises which HTML elements can be influenced by the style attribute. Some style attributes can be applied only to block-level, inline, or replaced elements. A block-level element is one that always starts on a new line and forces a new line after the end of the element (h1 and p elements, for example). An inline element is one that you can place in the middle of a text line without disturbing the content flow (em elements, for example). A replaced element is a block-level or inline element that has content that may be changed dynamically without requiring any reflow of surrounding content. The img element falls into this category because you can swap image source files within an img element's rectangular space. A listing category called "Initial Value" serves the same purpose as the "Default" category in other reference chapters. The terminology used in this chapter conforms with the terminology of the CSS specification. Many items contain a category called "Object Model Reference" to show the way scripts can reference the attribute as properties in a browser's document object model—specifically, as properties of the style object. Consult Chapter 9 for compatibility ratings for the scripted equivalents of style attributes, as they frequently differ from the style sheet attribute implementations shown in this chapter. Copyright © 2003 O'Reilly & Associates. All rights reserved. |
|