4.5. 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 property. Some style properties 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 property as properties in a browser's document object modelspecifically, as properties of the style object. Consult Chapter 2 for compatibility ratings for the scripted equivalents of style properties, as they frequently differ from the style sheet property implementations shown in this chapter. |