To give you enough freedom to select which elements a style is applied to, CSS2.1 supports four selector schemes. Each is based on some aspect of an element:
Also, CSS2.1 includes a way of attaching style rules to an element without using a traditional selector; the STYLE attribute effectively bypasses the entire selector mechanism. The four schemes can be combined in a single selector to put style properties on elements that exhibit a combination of characteristics. For example, the selector H1 EM uses element types (H1 and EM) and context (EM must be inside H1). |