CSS Property Reference
This reference includes all the properties included in the CSS 2.1 specification which became a W3C Recommendation on 7th
June 2011 in addition to the CSS 3 opacity property which became part of the CSS specification on the same date.
NOTE:CSS Aural Properties are part of the specification but user agents are not required to implement them in order to comply with the specification
and they are explained on the css aural properties page.
Background Properties
Border and Outline Properties
Margins and Padding
Font Properties
| Property |
Definition |
| font |
Sets all the font properties in one declaration. |
| font-family |
Sets the font family of an element. |
| font-size |
Sets the font size of an element. |
| font-style |
Sets the font style of an element. |
| font-variant |
Sets the font variant of an element. |
| font-weight |
Sets the font weight of an element. |
Text Properties
| Property |
Definition |
| color |
Sets the colour of text. |
| direction |
Sets the direction of text. |
| text-align |
Sets the horizontal alignment of text. |
| text-decoration |
Defines the decoration given to text. |
| text-indent |
Sets the level of indentation of the first line of text in a block. |
| text-transform |
Sets the capitalization of text in an element. |
| line-height |
Sets the line height of text in an element. |
| letter-spacing |
Sets the distance between letters in text. |
| unicode-bidi |
Allows the normal text direction to be overridden. |
| word-spacing |
Sets the spacing between words in text in an element. |
| vertical-align |
Sets the vertical alignment of an element. |
| white-space |
Defines how white space around an element is dealt with. |
Dimension Properties
| Property |
Definition |
| height |
Sets the height of an element. |
| min-height |
Sets the minimum height of an element. |
| max-height |
Sets the maximum height of an element. |
| width |
Sets the width of an element. |
| min-width |
Sets the minimum width of an element. |
| max-width |
Sets the maximum width of an element. |
List Properties
Table Properties
| Property |
Definition |
| border-collapse |
Sets whether table borders should be collapsed or not. |
| border-spacing |
Sets the distance between borders of adjacent cells. |
| caption-side |
Defines where a table caption is positioned. |
| empty-cells |
Defines behaviour for borders and backgrounds around empty cells. |
| table-layout |
Controls the algorithm used to layout a table. |
Positioning and Display Properties
| Property |
Definition |
| bottom |
Sets the bottom margin for a positioned box. |
| left |
Sets the left margin for a positioned box. |
| right |
Sets the right margin for a positioned box. |
| top |
Sets the top margin for a positioned box. |
| display |
Defines the type of box an element should generate. |
| position |
Sets the type of positioning for an element. |
| float |
Defines whether or not a box is floated. |
| clear |
Defines how an element displays in relation to previous floated content. |
| cursor |
Specifies the type of cursor to be displayed. |
| clip |
Defines clipping behaviour for an absolutely positioned element. |
| overflow |
Defines what happens when content overflows an element's box. |
| opacity |
Sets the opacity of an element. CSS3 PROPERTY |
| visibility |
Defines whether an element is visible or not. |
| z-index |
Defines the stack order of an element. |
Print Properties
| Property |
Definition |
| page-break-after |
Sets the page-break conditions after an element. |
| page-break-before |
Sets the page-break conditions before an element. |
| page-break-inside |
Sets the page-break conditions inside an element. |
| orphans |
When a page-break is inside an element this property sets the minimum number of lines
that must be left at the bottom of a page. |
| widows |
When a page-break is inside an element this property sets the minimum number of lines
that must be left at the top of a page. |
Generated Content Properties
| Property |
Definition |
| content |
Insert content with the :before or :after pseudo-elements. |
| counter-increment |
Increments one or more counters. |
| counter-reset |
Used to create or reset one or more counters. |
| quotes |
Sets the type of quotes for embedded quotations. |