W3Schools' CSS reference is tested regularly with all major browsers.
The "CSS" column indicates in which CSS version the property is defined (CSS1, CSS2, or CSS3).
Property |
Description |
CSS |
Sets the color of text |
1 |
|
Sets the opacity level for an element |
3 |
Property |
Description |
CSS |
Sets all the background properties in one declaration |
1 |
|
Sets whether a background image is fixed or scrolls with the rest of the page |
1 |
|
Sets the background color of an element |
1 |
|
Sets the background image for an element |
1 |
|
Sets the starting position of a background image |
1 |
|
Sets how a background image will be repeated |
1 |
|
Specifies the painting area of the background |
3 |
|
Specifies the positioning area of the background images |
3 |
|
Specifies the size of the background images |
3 |
|
Sets all the border properties in one declaration |
1 |
|
Sets all the bottom border properties in one declaration |
1 |
|
Sets the color of the bottom border |
1 |
|
Defines the shape of the border of the bottom-left corner |
3 |
|
Defines the shape of the border of the bottom-right corner |
3 |
|
Sets the style of the bottom border |
1 |
|
Sets the width of the bottom border |
1 |
|
Sets the color of the four borders |
1 |
|
A shorthand property for setting all the border-image-* properties |
3 |
|
Specifies the amount by which the border image area extends beyond the border box |
3 |
|
Specifies whether the image-border should be repeated, rounded or stretched |
3 |
|
Specifies the inward offsets of the image-border |
3 |
|
Specifies an image to be used as a border |
3 |
|
Specifies the widths of the image-border |
3 |
|
Sets all the left border properties in one declaration |
1 |
|
Sets the color of the left border |
1 |
|
Sets the style of the left border |
1 |
|
Sets the width of the left border |
1 |
|
A shorthand property for setting all the four border-*-radius properties |
3 |
|
Sets all the right border properties in one declaration |
1 |
|
Sets the color of the right border |
1 |
|
Sets the style of the right border |
1 |
|
Sets the width of the right border |
1 |
|
Sets the style of the four borders |
1 |
|
Sets all the top border properties in one declaration |
1 |
|
Sets the color of the top border |
1 |
|
Defines the shape of the border of the top-left corner |
3 |
|
Defines the shape of the border of the top-right corner |
3 |
|
Sets the style of the top border |
1 |
|
Sets the width of the top border |
1 |
|
Sets the width of the four borders |
1 |
|
box-decoration-break |
Sets the behaviour of the background and border of an element at page-break, or, for in-line elements, at line-break. |
3 |
Attaches one or more drop-shadows to the box |
3 |
Property |
Description |
CSS |
Specifies the bottom position of a positioned element |
2 |
|
Specifies which sides of an element where other floating elements are not allowed |
1 |
|
Clips an absolutely positioned element |
2 |
|
Specifies how a certain HTML element should be displayed |
1 |
|
Specifies whether or not a box should float |
1 |
|
Sets the height of an element |
1 |
|
Specifies the left position of a positioned element |
2 |
|
Specifies what happens if content overflows an element's box |
2 |
|
Specifies whether or not to clip the left/right edges of the content, if it overflows the element's content area |
3 |
|
Specifies whether or not to clip the top/bottom edges of the content, if it overflows the element's content area |
3 |
|
Sets all the padding properties in one declaration |
1 |
|
Sets the bottom padding of an element |
1 |
|
Sets the left padding of an element |
1 |
|
Sets the right padding of an element |
1 |
|
Sets the top padding of an element |
1 |
|
Specifies the type of positioning method used for an element (static, relative, absolute or fixed) |
2 |
|
Specifies the right position of a positioned element |
2 |
|
Specifies the top position of a positioned element |
2 |
|
Specifies whether or not an element is visible |
2 |
|
Sets the width of an element |
1 |
|
Sets the vertical alignment of an element |
1 |
|
Sets the stack order of a positioned element |
2 |
Property |
Description |
CSS |
Specifies the alignment between the lines inside a flexible container when the items do not use all available space. |
3 |
|
Specifies the alignment for items inside a flexible container. |
3 |
|
Specifies the alignment for selected items inside a flexible container. |
3 |
|
Specifies how a certain HTML element should be displayed |
1 |
|
Specifies the length of the item, relative to the rest |
3 |
|
Specifies the initial length of a flexible item |
3 |
|
Specifies the direction of the flexible items |
3 |
|
A shorthand property for the flex-direction and the flex-wrap properties |
3 |
|
Specifies how much the item will grow relative to the rest |
3 |
|
Specifies how the item will shrink relative to the rest |
3 |
|
Specifies whether the flexible items should wrap or not |
3 |
|
Specifies the alignment between the items inside a flexible container when the items do not use all available space. |
3 |
|
Sets all the margin properties in one declaration |
1 |
|
Sets the bottom margin of an element |
1 |
|
Sets the left margin of an element |
1 |
|
Sets the right margin of an element |
1 |
|
Sets the top margin of an element |
1 |
|
Sets the maximum height of an element |
2 |
|
Sets the maximum width of an element |
2 |
|
Sets the minimum height of an element |
2 |
|
Sets the minimum width of an element |
2 |
|
Sets the order of the flexible item, relative to the rest |
3 |
Property |
Description |
CSS |
Specifies whether a punctuation character may be placed outside the line box |
3 |
|
hyphens |
Sets how to split words to improve the layout of paragraphs |
3 |
Increases or decreases the space between characters in a text |
1 |
|
line-break |
|
3 |
Sets the line height |
1 |
|
overflow-wrap |
|
3 |
Specifies the length of the tab-character |
3 |
|
Specifies the horizontal alignment of text |
1 |
|
Describes how the last line of a block or a line right before a forced line break is aligned when text-align is "justify" |
3 |
|
Specifies the indentation of the first line in a text-block |
1 |
|
Specifies the justification method used when text-align is "justify" |
3 |
|
Controls the capitalization of text |
1 |
|
Specifies how white-space inside an element is handled |
1 |
|
Specifies line breaking rules for non-CJK scripts |
3 |
|
Increases or decreases the space between words in a text |
1 |
|
Allows long, unbreakable words to be broken and wrap to the next line |
3 |
Property |
Description |
CSS |
Specifies the decoration added to text |
1 |
|
Specifies the color of the text-decoration |
3 |
|
Specifies the type of line in a text-decoration |
3 |
|
Specifies the style of the line in a text decoration |
3 |
|
Adds shadow to text |
3 |
|
text-underline-position |
|
3 |
Property |
Description |
CSS |
Sets all the font properties in one declaration |
1 |
|
Specifies the font family for text |
1 |
|
font-feature-setting |
|
3 |
@font-feature-values |
|
3 |
font-kerning |
|
3 |
font-language-override |
|
3 |
font-synthesis |
|
3 |
font-variant-alternates |
|
3 |
font-variant-caps |
|
3 |
font-variant-east-asian |
|
3 |
font-variant-ligatures |
|
3 |
font-variant-numeric |
|
3 |
font-variant-position |
|
3 |
Specifies the font size of text |
1 |
|
Specifies the font style for text |
1 |
|
Specifies whether or not a text should be displayed in a small-caps font |
1 |
|
Specifies the weight of a font |
1 |
|
A rule that allows websites to download and use fonts other than the "web-safe" fonts |
3 |
|
Preserves the readability of text when font fallback occurs |
3 |
|
Selects a normal, condensed, or expanded face from a font family |
3 |
Property |
Description |
CSS |
Specifies the text direction/writing direction |
2 |
|
text-orientation |
|
3 |
text-combine-horizontal |
|
3 |
Used together with the direction property to set or return whether the text should be overridden to support multiple languages in the same document |
2 |
|
writing-mode |
|
3 |
Property |
Description |
CSS |
Specifies whether or not table borders should be collapsed |
2 |
|
Specifies the distance between the borders of adjacent cells |
2 |
|
Specifies the placement of a table caption |
2 |
|
Specifies whether or not to display borders and background on empty cells in a table |
2 |
|
Sets the layout algorithm to be used for a table |
2 |
Property |
Description |
CSS |
Increments one or more counters |
2 |
|
Creates or resets one or more counters |
2 |
|
Sets all the properties for a list in one declaration |
1 |
|
Specifies an image as the list-item marker |
1 |
|
Specifies if the list-item markers should appear inside or outside the content flow |
1 |
|
Specifies the type of list-item marker |
1 |
Property |
Description |
CSS |
Specifies the animation |
3 |
|
A shorthand property for all the animation properties below, except the animation-play-state property |
3 |
|
Specifies when the animation will start |
3 |
|
Specifies whether or not the animation should play in reverse on alternate cycles |
3 |
|
Specifies how many seconds or milliseconds an animation takes to complete one cycle |
3 |
|
Specifies what values are applied by the animation outside the time it is executing |
3 |
|
Specifies the number of times an animation should be played |
3 |
|
Specifies a name for the @keyframes animation |
3 |
|
Specifies the speed curve of the animation |
3 |
|
Specifies whether the animation is running or paused |
3 |
Property |
Description |
CSS |
Defines whether or not an element should be visible when not facing the screen |
3 |
|
Specifies the perspective on how 3D elements are viewed |
3 |
|
Specifies the bottom position of 3D elements |
3 |
|
Applies a 2D or 3D transformation to an element |
3 |
|
Allows you to change the position on transformed elements |
3 |
|
Specifies how nested elements are rendered in 3D space |
3 |
Property |
Description |
CSS |
A shorthand property for setting the four transition properties |
3 |
|
Specifies the name of the CSS property the transition effect is for |
3 |
|
Specifies how many seconds or milliseconds a transition effect takes to complete |
3 |
|
Specifies the speed curve of the transition effect |
3 |
|
Specifies when the transition effect will start |
3 |
Property |
Description |
CSS |
Tells the browser what the sizing properties (width and height) should include |
3 |
|
Used with the :before and :after pseudo-elements, to insert generated content |
2 |
|
Specifies the type of cursor to be displayed |
2 |
|
Provides the author the ability to style an element with an iconic equivalent |
3 |
|
ime-mode |
|
3 |
Specifies where to navigate when using the arrow-down navigation key |
3 |
|
Specifies the tabbing order for an element |
3 |
|
Specifies where to navigate when using the arrow-left navigation key |
3 |
|
Specifies where to navigate when using the arrow-right navigation key |
3 |
|
Specifies where to navigate when using the arrow-up navigation key |
3 |
|
Sets all the outline properties in one declaration |
2 |
|
Sets the color of an outline |
2 |
|
Offsets an outline, and draws it beyond the border edge |
3 |
|
Sets the style of an outline |
2 |
|
Sets the width of an outline |
2 |
|
Specifies whether or not an element is resizable by the user |
3 |
|
Specifies what should happen when text overflows the containing element |
3 |
Property |
Description |
CSS |
break-after |
|
3 |
break-before |