This section contains reference articles available for Cascading Style Sheets (CSS).
Attribute/Property Reference
!important
Increases the weight or importance of a particular declaration.
CSS Attributes: Behavior
This section describes the property that attaches Dynamic HTML (DHTML) behaviors to elements via CSS.
CSS Attributes: Border and Layout
This section contains a list of CSS properties that specifically apply to layout: borders, margins, and padding.
CSS Attributes: Color and Background
This section contains a list of CSS properties that apply to background styles and color.
CSS Attributes: Filter
This section describes the filter property used for visual styles and transitions.
CSS Attributes: Font and Text
This section contains a list of CSS properties that apply to font styles and text rendering.
CSS Attributes: Lists
This section contains a list of CSS properties that classify the markup of lists.
CSS Attributes: Positioning
This section contains a list of CSS properties that describe the size and position of elements, as well as their z-order and visibility.
CSS Attributes: Printing
This section contains a list of CSS properties that affect print media.
CSS Attributes: User Interface
This section describes the CSS properties that affect
user interaction with the HTML page.
Selectors
:active
Sets the style of an a element when the link is engaged or active.
:after
Defines generated content that appears after an element.
:before
Defines generated content that appears before an element.
:first-child
Applies one or more styles to any element that is the first child of its parent.
:first-letter
Applies one or more styles to the first letter of the object.
:first-line
Applies one or more styles to the first line of the object.
:focus
Sets the style of an element when it gains focus.
:hover
Sets the style of an element when the user hovers the mouse pointer over the element.
:link
Sets the style of an a element when the link has not been visited recently.
:visited
Sets the style of an a element when the link has been visited recently.
Adjacent Sibling (+) Combinator
Specifies an adjacent sibling relationship between selector elements.
Child (>) Combinator
Specifies a direct descendant relationship between selector elements.
Class Selector
Matches the class attribute of the specified element.
Descendant Combinator
Specifies an arbitrary ancestral relationship between selector elements.
Equality [=] Attribute Selector
Exactly matches the specified attribute value.
Existence [] Attribute Selector
Matches the attribute, whatever its value.
General Sibling (~) Combinator
Specifies a general sibling relationship between selector elements.
Hyphen [|=] Attribute Selector
Matches any attribute value that is exactly equal, or optionally, followed by a hyphen.
ID Selector
Matches the id attribute of the specified element.
Prefix [^=] Attribute Selector
Matches the specified prefix of an attribute value.
Substring [*=] Attribute Selector
Matches the specified substring of an attribute value.
Suffix [$=] Attribute Selector
Matches the specified suffix of an attribute value.
Type Selector
Matches any element of the specified type.
Universal (*) Selector
Matches any element type.
Whitespace [~=] Attribute Selector
Exactly matches the specified attribute value in a space-delimited list of values.
At-rules
@charset
Sets the character set for an external style sheet.
@font-face
Sets a font to embed in the HTML document.
@import
Imports an external style sheet.
@media
Sets the media types for a set of rules in a styleSheet object.
@page
Sets the dimensions, orientation, and margins of a page box in a styleSheet.
Collections
imports
Retrieves a collection of all the imported style sheets defined for the respective styleSheet object.
pages
Retrieves a collection of page objects, which represent @page rules in a styleSheet.
rules
Retrieves a collection of rules defined in a style sheet.
styleSheets
Retrieves a collection of styleSheet objects representing the style sheets that correspond to each instance of a link or style object in the document.
Methods
addImport
Adds a style sheet to the imports collection for the specified style sheet.
addRule
Creates a new rule for a style sheet.
createStyleSheet
Creates a style sheet for the document.
getExpression
Retrieves the expression for the given property.
removeExpression
Removes the expression from the specified property.
removeImport
Removes the imported style sheet from the imports collection based on ordinal position.
removeRule
Deletes an existing style rule for the styleSheet object, and adjusts the index of the rules collection accordingly.
setExpression
Sets an expression for the specified object.
Appendices
Color Table
Colors can be specified in HTML pages in two ways
CSS Length Units Reference
This section defines the supported length units for CSS