CSS Vocabulary – declarations, declaration blocks and rules

css-128

A DECLARATION is the set of property names and their accompanying values. [php]background: #cccccc;[/php] A DECLARATION BLOCK is nothing more than a set of DECLARATIONS within the tags { }. [php] { background: #cccccc; margin: 10px 6px; border: 1px dotted #404040; } [/php] A RULE [sometimes known as a RULE SET] is a SELECTOR/S followed by the BLOCK DECLARATION. [php] …

CSS vocabulary – selectors and properties

css-128

CSS uses SELECTORS for binding style properties to elements in the document. For instance, the selector ‘h1′ represents an element in the document tree. h1{} You can apply PROPERTIES to that selector, such as applying a border to the h1 selector. h1 {border:1px solid #000000 } Of course, you can apply more than one property to any one selector. h1 …