properties
Summary
CSS properties are the key to altering the styling of HTML elements in your web documents.
- font-variant
- Selects a normal, or small-caps face from a font family. Also possible by using the font shorthand.
- -ms-flex-pack
- Gets or sets a value that specifies how excess space is distributed (along the axis defined by the -ms-flex-direction property) between child elements of the object.
- align-content
- Aligns a flex container’s lines within the flex container when there is extra space in the cross-axis, similar to how justify-content aligns individual items within the main-axis.
- align-items
- Sets the default alignment in the cross axis for all of the flex container’s items, including anonymous flex items, similarly to how justify-content aligns items along the main axis.
- align-self
- Allows the default alignment to be overridden for individual flex items.
- alignment-adjust
- This property allows precise alignment of elements, such as graphics, that do not have a baseline-table or lack the desired baseline in their baseline-table. With the alignment-adjust property, the position of the baseline identified by the alignment-baseline can be explicitly determined. It also determines precisely the alignment point for each glyph within a textual element.
- all-space-treatment
- Specifies the treatment of all consecutive white space characters (with no exception for line feed characters).
- animation
- Shorthand property to define a CSS animation, setting all parameters at once.
- animation-delay
- Defines a length of time to elapse before an animation starts, allowing an animation to begin execution some time after it is applied.
- animation-direction
- Defines whether an animation should run in reverse on some or all cycles.
- animation-duration
- Defines the length of time an animation takes to complete one cycle.
- animation-fill-mode
- Defines what values are applied by the animation outside the time it is executing (before and after the animation). By default, an animation does not affect property values between the time it is applied (when the animation-name property is set on an element) and the time it begins execution (determined by the animation-delay property). Also, by default an animation does not affect property values after the animation ends (determined by the animation-duration property). The animation-fill-mode property can override this behavior.
- animation-iteration-count
- Specifies how many times an animation cycle should play.
- animation-name
- Defines the list of animations that apply to the element.
- animation-play-state
- Defines whether an animation is running or paused.
- animation-timing-function
- Describes how the animation will progress over one cycle of its duration.
- appearance
- Allows changing the style of any element to platform-based interface elements or vice versa.
- backface-visibility
- Determines whether or not the “back” side of a transformed element is visible when facing the viewer.
- background
- This background property is a shorthand property for setting the color, position, size, repeat, clip, origin, attachment, and image of the element. The background- properties provide fundamental styles to an element, such as color, image, and position. CSS3 adds more properties for handling backgrounds, including properties that improve the mobile web experience. Many CSS background properties can be set, at the same time, with this background property.
- background-attachment
- Defines if a background image scrolls with the content or stays fixed.
- background-blend-mode
- This property describes how the element’s background images should blend with each other and the element’s background color. The value is a list of blend modes that corresponds to each background image. Each element in the list will apply to the corresponding element of background-image. If a property doesn’t have enough comma-separated values to match the number of layers, the UA must calculate its used value by repeating the list of values until there are enough.
- background-clip
- Specifies how an element’s background is clipped.
- background-color
- Sets a color to fill up the background of an element it is applied to and accepts any valid CSS color.
- background-image
- Applies one or more background images to an element. These can be any valid CSS image, including url() paths to image files or CSS gradients.
- background-origin
- Specifies what the background-position property is relative to.
- background-position
background-position
allows you to set the placement of abackground-image
on the element it is applied to.background-position
generally takes two values, which set the horizontal and vertical position of the background image inside the element.- background-position-x
- Sets the horizontal position of a background image.
- background-position-y
- Sets vertical starting position of a background image.
- background-repeat
- Background-repeat defines if and how background images will be repeated after they have been sized and positioned
- background-size
- Specifies the size of the background images.
- baseline-shift
- Obsolete - spec retired, not implemented.
- behavior
- Non standard. Sets or retrieves the location of the Dynamic HTML (DHTML) behavior.
- block-progression
- Sets the block progression and layout orientation: deprecated in favor of the writing-mode property.
- border
- Shorthand property that defines the different properties of all four sides of an element’s border in a single declaration. It can be used to set border-width, border-style and border-color, or a subset of these.
- border-bottom
- Shorthand property that defines the border-width, border-style and border-color of an element’s bottom border in a single declaration. Note that you can use the corresponding longhand properties to set specific individual properties of the bottom border — border-bottom-width, border-bottom-style and border-bottom-color.
- border-bottom-color
- Sets the color of the bottom border. This page explains the border-bottom-color value, but often you will find it more convenient to fix the border’s bottom color as part of a shorthand set, either border-bottom or border-color. Colors can be defined several ways. For more information, see Usage.
- border-bottom-left-radius
- Defines the shape of the border of the bottom-left corner.
- border-bottom-right-radius
- Defines the shape of the border of the bottom-right corner.
- border-bottom-style
- Sets the style of an element’s bottom border. To set all four borders, use the shorthand property, border-style. Otherwise, you can set the borders individually with border-top-style, border-right-style, border-bottom-style, border-left-style.
- border-bottom-width
- Sets the width of an element’s bottom border. To set all four borders, use the border-width shorthand property which sets the values simultaneously for border-top-width, border-right-width, border-bottom-width, and border-left-width.
- border-collapse
- Border-collapse can be used for collapsing the borders between table cells
- border-color
- The CSS border-color property sets the color of an element’s four borders. This property can have from one to four values, made up of the elementary properties: The default color is the currentColor of each of these values. If you provide one value, it sets the color for the element. Two values set the horizontal and vertical values, respectively. Providing three values sets the top, vertical, and bottom values, in that order. Four values set all for sides: top, right, bottom, and left, in that order.
- border-corner-shape
- Specifies different corner clipping effects, such as scoop (inner curves), bevel (straight cuts) or notch (cut-off rectangles). Works along with border-radius to specify the size of each corner effect.
- border-image
- Shorthand property that defines an image to be displayed and its positioning, instead of a solid color, for ‘border’ property. It can be used to set border-image-source, border-image-slice, border-image-width, border-image-outset and border-image-repeat, or a subset of these.
- border-image-outset
- The
border-image-outset
property describes, by which amount the border image area extends beyond the border box. - border-image-repeat
- The
border-image-repeat
CSS property defines how the middle part of a border image is handled to match the size of the border. It has a one-value syntax which describes the behavior for all sides, and a two-value syntax that sets a different value for the horizontal and vertical behavior. - border-image-slice
- Divides the image specified by border-image-source in nine regions: the four corners, the four edges and the middle. It does this by specifying 4 inward offsets.
- border-image-source
- The property
border-image-source
is used to set the image to be used instead of the border style. If this is set tonone
theborder-style
is used instead. - border-image-width
- The
border-image-width
CSS property defines the offset to use for dividing the border image in nine parts, the top-left corner, central top edge, top-right-corner, central right edge, bottom-right corner, central bottom edge, bottom-left corner, and central right edge. They represent inward distance from the top, right, bottom, and left edges. - border-left
- Shorthand property that defines the border-width, border-style and border-color of an element’s left border in a single declaration. Note that you can use the corresponding longhand properties to set specific individual properties of the left border — border-left-width, border-left-style and border-left-color.
- border-left-color
- The CSS border-left-color property sets the color of an element’s left border. This page explains the border-left-color value, but often you will find it more convenient to fix the border’s left color as part of a shorthand set, either border-left or border-color. Colors can be defined several ways. For more information, see Usage.
- border-left-style
- Sets the style of an element’s left border. To set all four borders, use the shorthand property, border-style. Otherwise, you can set the borders individually with border-top-style, border-right-style, border-bottom-style, border-left-style.
- border-left-width
- Sets the width of an element’s left border. To set all four borders, use the border-width shorthand property which sets the values simultaneously for border-top-width, border-right-width, border-bottom-width, and border-left-width.
- border-radius
- The border-radius CSS property allows authors to round the corners of an element. The rounding can be different per-corner, and it could have different horizontal and vertical radii, to produce elliptical curves.
- border-right
- Shorthand property that defines the border-width, border-style and border-color of an element’s right border in a single declaration. Note that you can use the corresponding longhand properties to set specific individual properties of the right border — border-right-width, border-right-style and border-right-color.
- border-right-color
- Sets the color of an element’s right border. This page explains the border-right-color value, but often you will find it more convenient to fix the border’s right color as part of a shorthand set, either border-right or border-color. Colors can be defined several ways. For more information, see Usage.
- border-right-style
- Sets the style of an element’s right border. To set all four borders, use the shorthand property, border-style. Otherwise, you can set the borders individually with border-top-style, border-right-style, border-bottom-style, border-left-style.
- border-right-width
- Sets the width of an element’s right border. To set all four borders, use the border-width shorthand property which sets the values simultaneously for border-top-width, border-right-width, border-bottom-width, and border-left-width.
- border-spacing
- Specifies the distance between the borders of adjacent cells.
- border-style
- Sets the style of an element’s four borders. This property can have from one to four values. With only one value, the value will be applied to all four borders; otherwise, this works as a shorthand property for each of border-top-style, border-right-style, border-bottom-style, border-left-style, where each border style may be assigned a separate value.
- border-top
- Shorthand property that defines the border-width, border-style and border-color of an element’s top border in a single declaration. Note that you can use the corresponding longhand properties to set specific individual properties of the top border — border-top-width, border-top-style and border-top-color.
- border-top-color
- Sets the color of an element’s top border. This page explains the border-top-color value, but often you will find it more convenient to fix the border’s top color as part of a shorthand set, either border-top or border-color. Colors can be defined several ways. For more information, see Usage.
- border-top-left-radius
- Sets the rounding of the top-left corner of the element.
- border-top-right-radius
- Sets the rounding of the top-right corner of the element.
- border-top-style
- Sets the style of an element’s top border. To set all four borders, use the shorthand property, border-style. Otherwise, you can set the borders individually with border-top-style, border-right-style, border-bottom-style, border-left-style.
- border-top-width
- Sets the width of an element’s top border. To set all four borders, use the border-width shorthand property which sets the values simultaneously for border-top-width, border-right-width, border-bottom-width, and border-left-width.
- border-width
- Sets the width of an element’s four borders. This property can have from one to four values. This is a shorthand property for setting values simultaneously for border-top-width, border-right-width, border-bottom-width, and border-left-width.
- bottom
- Sets the position of the bottom edge of an element.
- box-align
- Obsolete.
- box-decoration-break
- Breaks a box into fragments creating new borders, padding and repeating backgrounds or lets it stay as a continuous box on a page break, column break, or, for inline elements, at a line break.
- box-direction
- Deprecated
- box-flex
- Do not use. This property has been replaced by the flex property.
- box-line-progression
- Do not use. This property has been replaced by the flex-wrap property. Gets or sets a value that specifies the direction to add successive rows or columns when the value of box-lines is set to multiple.
- box-lines
- Do not use. This property has been replaced by the flex-wrap property. Gets or sets a value that specifies whether child elements wrap onto multiple lines or columns based on the space available in the object.
- box-orient
- Deprecated
- box-pack
- Do not use. This property has been replaced by flex-pack.
- box-shadow
- The
box-shadow
property programmatically creates one or more shadows on the inside or outside of a block level element. - box-sizing
- The
box-sizing
property alters the CSS box model used to calculate widths and heights of elements, so that they can be equal to the width and height of the content-, padding- or border-box. - break-after
- The CSS break-after property allows you to force a break on multi-column layouts. More specifically, it allows you to force a break after an element. It allows you to determine if a break should occur, and what type of break it should be. The break-after CSS property describes how the page, column or region break behaves after the generated box. If there is no generated box, the property is ignored.
- break-before
- Control page/column/region breaks that fall above a block of content
- break-inside
- Control page/column/region breaks that fall within a block of content
- caption-side
- Specifies the placement of a table caption.
- clear
- The clear CSS property specifies if an element can be positioned next to or must be positioned below the floating elements that precede it in the markup.
- clip
- Deprecated; see clip-path. Lets you specify the dimensions of an absolutely positioned element that should be visible, and the element is clipped into this shape, and displayed.
- clip-path
- The clip-path property prevents a portion of an element from drawing by defining a clipping region.
- clip-rule
- Clipping crops an graphic, so that only a portion of the graphic is rendered, or filled. This clip-rule property, when used with the clip-path property, defines which clip rule, or algorithm, to use when filling the different parts of a graphics.
- color
- The color property sets the color of an element’s foreground content (usually text), accepting any standard CSS color from keywords and hex values to RGB(a) and HSL(a).
- column-count
Specifies the number of columns an element should be divided into.
- column-fill
Specifies how to fill columns (balanced or sequential).
- column-gap
The
column-gap
property controls the width of the gap between columns in multi-column elements.- column-rule
Sets the width, style, and color of the rule between columns.
- column-rule-color
Specifies the color of the rule between columns.
- column-rule-style
Specifies the style of the rule between columns. The column-rule-style values are the same as for border-style.
- column-span
The
column-span
CSS property makes it possible for an element to span across all columns when its value is set to all. An element that spans more than one column is called a spanning element.- column-width
Specifies the width of columns in multi-column elements.
- columns
This property is a shorthand property for setting column-width and/or column-count.
- content
The content property is used to display content in the pseudo-elements ::before and ::after.
- counter-increment
The counter-increment property accepts one or more names of counters (identifiers), each one optionally followed by an integer which specifies the value by which the counter should be incremented (e.g. if the value is 2, the counter increases by 2 each time it is invoked).
- counter-reset
The counter-reset property contains a list of one or more names of counters, each one optionally followed by an integer (otherwise, the integer defaults to 0.) Each time the given element is invoked, the counters specified by the property are set to the given integer.
- cue
The
cue
property specifies sound files (known as an “auditory icon”) to be played by speech media agents before and after presenting an element’s content; if only one file is specified, it is played both before and after. The volume at which the file(s) should be played, relative to the volume of the main element, may also be specified. The icon files may also be set separately with thecue-before
andcue-after
properties.- cue-before
The
cue-before
property specifies a sound file (known as an “auditory icon”) to be played by speech media agents before presenting an element’s content; the volume at which the file should be played may also be specified. The shorthand propertycue
sets cue sounds for both before and after the element is presented.- cursor
The cursor CSS property specifies the mouse cursor displayed when the mouse pointer is over an element.
- direction
The
direction
CSS property specifies the text direction/writing direction. Thertl
is used for Hebrew or Arabic text, theltr
is for other languages.- display
This property specifies the type of rendering box used for an element. It is a shorthand property for many other display properties.
- empty-cells
Sets whether or not to display borders and background on empty cells in a table.
- fill
The ‘fill’ property paints the interior of the given graphical element. The area to be painted consists of any areas inside the outline of the shape. To determine the inside of the shape, all subpaths are considered, and the interior is determined according to the rules associated with the current value of the ‘fill-rule’ property. The zero-width geometric outline of a shape is included in the area to be painted.
- fill-opacity
‘fill-opacity’ specifies the opacity of the painting operation used to paint the interior the current object. (See Painting shapes and text.)
- fill-rule
The ‘fill-rule’ property indicates the algorithm which is to be used to determine what parts of the canvas are included inside the shape. For a simple, non-intersecting path, it is intuitively clear what region lies "inside"; however, for a more complex path, such as a path that intersects itself or where one subpath encloses another, the interpretation of “inside” is not so obvious.
The ‘fill-rule’ property provides two options for how the inside of a shape is determined:
- filter
Applies various image processing effects. This property is largely unsupported. See Compatibility section for more information.
- flex
The flex CSS property specifies the ability of a flex item to alter its dimensions to fill the available space. flex is a shorthand property comprised of the flex-grow, flex-shrink, and flex-basis properties. A flex item can be stretched to use available space proportional to its flex grow factor, or reduced proportional to its flex shrink factor to prevent overflow.
- flex-align
Obsolete, do not use. This property has been renamed to align-items.
Specifies the alignment (perpendicular to the layout axis defined by the flex-direction property) of child elements of the object.
- flex-basis
The flex-basis CSS property describes the initial main size of the flex item before any free space is distributed according to the flex factors described in the flex property (flex-grow and flex-shrink).
- flex-direction
The flex-direction CSS property describes how flex items are placed in the flex container, by setting the direction of the flex container’s main axis.
- flex-flow
The flex-flow CSS property defines the flex container’s main and cross axis. It is a shorthand property for the flex-direction and flex-wrap properties.
- flex-grow
The flex-grow CSS property specifies how much a flex item will enlarge with respect to the other items in the flex container to fill an expanded container.
- flex-item-align
Do not use. This property has been renamed to align-self
Specifies the alignment (perpendicular to the layout axis defined by flex-direction) of child elements of the object.
- flex-line-pack
Do not use. This property has been renamed to align-content.
Specifies how a flexbox’s lines align within the flexbox when there is extra space along the axis that is perpendicular to the axis defined by the flex-direction property.
- flex-order
Gets or sets a value that specifies the ordinal group that a flexbox element belongs to. This ordinal value identifies the display order for the group.
- flex-shrink
The flex-shrink CSS property specifies how much a flex item will be reduced with respect to the other items in the flex container to fit within a reduced container.
- flex-wrap
The flex-wrap property controls whether the flex container is single-line or multi-line, and the direction of the cross-axis, which determines the direction in which new lines are stacked.
- float
Elements which have the style
float
are floated horizontally. These elements can move as far to theleft
orright
of the containing element. All elements after the floating element will flow around it, but elements before the floating element are not impacted. If several floating elements are placed after each other, they will float next to each other as long as there is room.- flow-from
Flows content from a named flow (specified by a corresponding flow-into) through selected elements to form a dynamic chain of layout regions.
- flow-into
Diverts the selected element’s content into a named flow, used to thread content through different layout regions specified by flow-from.
- font
The
font
property is shorthand that allows you to do one of two things: you can either set up six of the most mature font properties in one line, or you can set one of a choice of keywords to adopt a system font setting.- font-family
The
font-family
property allows one or more font family names and/or generic family names to be specified for usage on the selected element(s)' text. The browser then goes through the list; for each character in the selection it applies the first font family that has an available glyph for that character.- font-feature-settings
The
font-feature-settings
property gets or sets one or more values that specify glyph substitution (special font characters such as ligatures and figures) and positioning in fonts that include OpenType layout features.- font-kerning
The
font-kerning
property allows contextual adjustment of inter-glyph spacing, i.e. the spaces between the characters in text. This property controls <bold>metric kerning</bold> - that utilizes adjustment data contained in the font. Optical Kerning is not supported as yet.- font-language-override
The
‘font-language-override’
property allows authors to explicitly specify the language system of the font, overriding the language system implied by the content language.- font-size
font-size
sets the font size of the text inside the element to which it is applied, and that of its descendants. You can size text using absolute measurements, or measurements relative to the affected element’s parent or root elements. CSS Text Styling Fundamentals provides an overview.- font-size-adjust
The
font-size-adjust
property adjusts the font-size of the fallback fonts defined with font-family, so that the x-height is the same no matter what font is used. This preserves the readability of the text when fallback happens.- font-stretch
Allows you to expand or condense the widths for a normal, condensed, or expanded font face.
- font-variant-alternates
Fonts can provide alternate glyphs in addition to default glyph for a character. This property provides control over the selection of these alternate glyphs.
- font-weight
The
font-weight
property specifies the weight or boldness of the font (their degree of blackness or stroke thickness). Note that some fonts are not available in all weights; some are available only on normal and bold.- grid
Foundation of a two-dimensional grid-based layout system. Defines an element as part of a grid and permits those elements to be displayed differently than the flow order. Also used as a shorthand for setting all the explicit grid properties (grid-template-rows, grid-template-columns, and grid-template-areas), as well as all the implicit grid properties (grid-auto-rows, grid-auto-columns, and grid-auto-flow), in a single declaration. If the <grid-auto-rows> value is omitted, it is set to the value specified for grid-auto-columns. Other omitted values are set to their initial values.
- grid-area
Lays out one or more grid items bound by 4 grid lines. Shorthand for setting grid-column-start, grid-column-end, grid-row-start, and grid-row-end in a single declaration.
- grid-auto-columns
Changes default size of columns. Creates implicit grid tracks when a grid item is placed into a row or column that is not explicitly sized (by grid-template-rows or grid-template-columns). This property (with grid-auto-rows) specifies the default size of such implicitly-created tracks.
- grid-auto-flow
Automatically places grid elements into the grid layout if an explicit location is not designated. Designates the direction of the the flow and whether rows or columns must be added to accommodate the element.
- grid-auto-position
Specifies the automatic default location if a grid container does not specify automatic-placement strategy via grid-auto-flow.
- grid-auto-rows
Changes default size of grid rows. Creates implicit grid tracks when a grid item is placed into a row that is not explicitly sized (by grid-template-rows ) or when the auto-placement algorithm has generated additional rows. This property (with grid-auto-columns) specifies the size of such implicitly-created tracks.
- grid-column
Controls a grid item’s placement in a grid area, particularly grid position and a grid span. Shorthand for setting grid-column-start and grid-column-end in a single declaration.
- grid-column-end
Controls a grid item’s placement in a grid area as well as grid position and a grid span. The grid-column-end property (with grid-row-start, grid-row-end, and grid-column-start) determines a grid item’s placement by specifying the grid lines of a grid item’s grid area.
- grid-column-position
Specifies the column position to place a grid item based upon integer location, string value, or column size.
- grid-column-span
See css/properties/grid-column. This property has been removed from the specification.
- grid-column-start
Determines a grid item’s placement by specifying the starting grid lines of a grid item’s grid area . A grid item’s placement in a grid area consists of a grid position and a grid span. See also ( grid-row-start, grid-row-end, and grid-column-end)
- grid-definition-columns
This property can specify the length, a percentage of the grid container’s size, a measurement of the contents occupying the column, or a fraction of the free space in the grid. You can also specify a range using minmax(), which combines any of these measurements to define a min and max size for the column.
As well as referring to grid lines by their numerical index, you can also name lines. Names can make the grid-placement properties easier to understand and maintain. Lines can have multiple names, such as ‘first’ and 'header’.
- grid-definition-rows
This property can specify the length, a percentage of the grid container’s size, a measurement of the contents occupying the row, or a fraction of the free space in the grid. You can also specify a range using minmax(), which combines any of these measurements to define a min and max size for the row.
As well as referring to grid lines by their numerical index, you can also name lines. Names can make the grid-placement properties easier to understand and maintain. Lines can have multiple names, such as ‘first’ and 'header’.
- grid-row
Gets or sets a value that indicates which row an element within a Grid should appear in. Shorthand for setting grid-row-start and grid-row-end in a single declaration.
- grid-row-end
Determines a grid item’s placement by specifying the block-end. A grid item’s placement in a grid area consists of a grid position and a grid span. The grid-row-end property (with grid-row-start, grid-column-start, and grid-column-end) determines a grid item’s placement by specifying the grid lines of a grid item’s grid area.
- grid-row-position
Specifies a row position based upon an integer location, string value, or desired row size.
css/properties/grid-row is used as short-hand for grid-row-position and grid-row-position
- grid-row-start
- A grid item’s placement in a grid area consists of a grid position and a grid span. The grid-row-start property (with grid-row-end, grid-column-start, and grid-column-end) determines a grid item’s placement by specifying the grid lines of a grid item’s grid area.
- grid-template
- Shorthand for setting grid-template-columns, grid-template-rows, and grid-template-areas in a single declaration.
- grid-template-areas
- Specifies named grid areas which are not associated with any particular grid item, but can be referenced from the grid-placement properties. The syntax of the grid-template-areas property also provides a visualization of the structure of the grid, making the overall layout of the grid container easier to understand.
- grid-template-columns
- Specifies (with grid-template-rows) the line names and track sizing functions of the grid. Each sizing function can be specified as a length, a percentage of the grid container’s size, a measurement of the contents occupying the column or row, or a fraction of the free space in the grid.
- grid-template-rows
- Specifies (with grid-template-columns) the line names and track sizing functions of the grid. Each sizing function can be specified as a length, a percentage of the grid container’s size, a measurement of the contents occupying the column or row, or a fraction of the free space in the grid.
- height
- Sets the height of an element. The content area of the element height does not include the padding, border, and margin of the element.
- knock-out
- Defines whether an element group is a knock-out group. When a group is set to knock-out, the elements in the group only composite and blend with elements outside the group. When a group is set to preserve (the default), the elements composite normally and blend with other elements inside and outside the group.
- left
- Sets the left edge of an element
- line-height
- The line-height property specifies the height of an inline block level element. The value of the line-height property cannot be negative.
- list-style
- Shorthand property that sets the
list-style-type
,list-style-position
andlist-style-image
properties in one declaration. - list-style-image
- This property sets the image that will be used as the list item marker. When the image is available, it will replace the marker set with the ‘list-style-type’ marker. That also means that if the image is not available, it will show the style specified by list-style-property
- list-style-position
- Specifies if the list-item markers should appear inside or outside the content flow.
- list-style-type
- Specifies the type of list-item marker in a list.
- margin
- The
margin
property is shorthand to allow you to set all four margins of an element at once. Its equivalent longhand properties aremargin-top
,margin-right
,margin-bottom
andmargin-left
. Negative values are also allowed. - margin-bottom
margin-bottom
sets the bottom margin of an element.- margin-left
margin-left
sets the left margin of an element.- margin-right
margin-right
sets the right margin of an element.- margin-top
margin-top
sets the top margin of an element.- marquee-direction
- The
marquee-direction
determines the initial direction in which the marquee content moves. - marquee-play-count
- This property specifies how many times the marquee content moves.
- marquee-speed
- The
marquee-speed
determines how fast the marquee content scrolls. - mask
- This property is shorthand for setting mask-image, mask-mode, mask-repeat, mask-position, mask-clip, mask-origin, mask-composite and mask-size. Omitted values are set to their original properties’ initial values.
- mask-border
- This property is shorthand for setting mask-border-source, mask-border-slice, mask-border-width, mask-border-outset, and mask-border-repeat. Omitted values are set to their original properties’ initial values.
- mask-border-outset
- This property specifies the amount by which the mask box image area extends beyond the border box, similar to the CSS border-image-outset property. The four values set the outsets on the top, right, bottom, and left sides in that order.
- mask-border-repeat
- This property specifies how the images for the sides and the middle part of the mask image are scaled and tiled. The first keyword applies to the horizontal sides, the second one applies to the vertical ones. If the second keyword is absent, it is assumed to be the same as the first, similar to the CSS border-image-repeat property.
- mask-border-slice
- This property specifies inward offsets from the top, right, bottom, and left edges of the mask image, dividing it into nine regions: four corners, four edges, and a middle. The middle image part is discarded and treated as fully transparent black unless the fill keyword is present. The four values set the top, right, bottom and left offsets in that order, similar to the CSS border-image-slice property.
- mask-clip
- Determines the mask painting area, which defines the area that is affected by the mask. The painted content of an element may be restricted to this area.
- mask-composite
- This property allows to composite multiple mask layers define by mask-image with different Porter-Duff compositing modes. As of time of writing, this property is not yet implemented in most browsers.
- mask-image
- This property sets the mask image or the mask source of an element.
- mask-mode
- This property indicates whether the <mask-reference> is treated as a luminescence mask or as an alpha mask.
- mask-position
- This property sets the initial position of a mask image. Position can be specified in terms of percentages of the distance from upper left corner (original point) or using the keywords top, left, center, right, or bottom, similar to the CSS background-position property.
- mask-repeat
- Specifies how mask images are tiled (repeated) after they have been sized and positioned.
- mask-size
- Specifies the size of the mask images, similar to the CSS background-size property.
- mask-type
- Defines whether the content of the <mask> element is treated as as luminance mask or an alpha mask.
- max-height
- Sets the maximum height for an element. It prevents the height of the element to exceed the specified value. If min-height is specified and is greater than max-height, max-height is overridden.
- max-width
- Sets the maximum width for an element. It limits the width property to be larger than the value specified in max-width.
- min-width
- Sets the minimum width of an element. It limits the width property to be not smaller than the value specified in min-width.
- object-fit
- The object-fit property defines how content of a replaced element (e.g., a video or an image) is made to fit the dimensions of its containing box.
- opacity
- The opacity property controls transparency and opacity of an element. Its values range from 0 to 1. Assuming defaults at parent level, an element with an opacity of 1 is completely opaque, whereas and element with an opacity of 0 is completely transparent. The opacity used when rendering an element is the product of its opacity and the opacity of its ancestors.
- order
- The order property controls the order in which flex items appear within their flex container, by assigning them to ordinal groups.
- orphans
- In typography terms, an orphan is the first line of a paragraph that is left behind on the old page while the paragraph continues on the next. The orphans CSS property refers to the minimum number of lines in a block container that must be left at the bottom of the old page. This property is normally used to control how page breaks occur. This property only affects paged media such as print. For example, if a paragraph can’t fit on one page in its entirety it is split wherever it is possible. In this way single lines of a paragraph can appear on page before it continues on the next page. This is usually unwanted, so many word processors require at least two lines to be left on an old page, instead of one. You can give it either a positive number (where 2 is the default) or inherit. Note that the orphan property does not generally affect non-paged media such as screen. However, browsers supporting both orphans and columns will apply the intended functionality to columns as well. Also, the property only affects block-level elements.
- outline
- The CSS
outline
property is a shorthand property for setting one or more of the individual outline properties outline-style, outline-width and outline-color in a single rule. In most cases the use of this shortcut is preferable and more convenient. Outlines differ from borders in the following ways:- Outlines do not take up space, they are drawn above the content.
- Outlines may be non-rectangular. They are rectangular in Gecko/Firefox. Internet Explorer attempts to place the smallest contiguous outline around all elements or shapes that are indicated to have an outline. Opera draws a non-rectangular shape around a construct.
- outline-color
- The outline-color property sets the color of the outline of an element. An outline is a line that is drawn around elements, outside the border edge, to make the element stand out.
- outline-offset
- The outline-offset property offsets the outline and draw it beyond the border edge.
- outline-style
- The outline-style property sets the style of the outline of an element. An outline is a line that is drawn around elements, outside the border edge, to make the element stand out.
- outline-width
- The outline-width property sets the width of the outline of an element. An outline is a line that is drawn around elements, outside the border edge, to make the element stand out.
- overflow
- The
overflow
property controls how extra content exceeding the bounding box of an element is rendered. It can be used in conjunction with an element that has a fixed width and height, to eliminate text-induced page distortion. - overflow-style
- Specifies the preferred scrolling methods for elements that overflow.
- overflow-wrap
- This property specifies whether or not particularly long words will be ‘broken’ (separated into multiple lines) if necessary in order to fit in within its container.
- overflow-x
- The
overflow-x
property is a specific case of the genericoverflow
property. It controls how extra content exceeding the x-axis of the bounding box of an element is rendered. - overflow-y
- The
overflow-y
property is a specific case of the genericoverflow
property. It controls how extra content exceeding the y-axis of the bounding box of an element is rendered. - padding
- The
padding
optional CSS property sets the required padding space on one to four sides of an element. The padding area is the space between an element and its border. Negative values are not allowed but decimal values are permitted. The element size is treated as fixed, and the content of the element shifts toward the center as padding is increased. Thepadding
property is a shorthand to avoid setting each side separately (padding-top, padding-right, padding-bottom, padding-left). - padding-bottom
- The
padding-bottom
CSS property of an element sets the padding space required on the bottom of an element. The padding area is the space between the content of the element and its border. Contrary to margin-bottom values, negative values ofpadding-bottom
are invalid. - padding-left
- The
padding-left
CSS property of an element sets the padding space required on the left side of an element. The padding area is the space between the content of the element and its border. Contrary to margin-left values, negative values ofpadding-left
are invalid. - padding-right
- The
padding-right
CSS property of an element sets the padding space required on the right side of an element. The padding area is the space between the content of the element and its border. Contrary to margin-right values, negative values ofpadding-right
are invalid. - padding-top
- The
padding-top
CSS property of an element sets the padding space required on the top of an element. The padding area is the space between the content of the element and its border. Contrary to margin-top values, negative values ofpadding-top
are invalid. - page-break-after
- The page-break-after property is supported in all major browsers. With CSS3, page-break-* properties are only aliases of the break-* properties. The CSS3 Fragmentation spec defines breaks for all CSS box fragmentation.
- page-break-before
- The page-break-before property sets the page-breaking behavior before an element. With CSS3, page-break-* properties are only aliases of the break-* properties. The CSS3 Fragmentation spec defines breaks for all CSS box fragmentation.
- page-break-inside
- Sets the page-breaking behavior inside an element. With CSS3, page-break-* properties are only aliases of the break-* properties. The CSS3 Fragmentation spec defines breaks for all CSS box fragmentation.
- pause
- The
pause
property determines how long a speech media agent should pause before and after presenting an element. It is a shorthand for thepause-before
andpause-after
properties. - pause-after
- The
pause-after
property determines how long a speech media agent should pause after presenting an element. It may be replaced by the shorthand propertypause
, which sets pause time before and after. - pause-before
- The
pause-before
property determines how long a speech media agent should pause before presenting an element. It may be replaced by the shorthand propertypause
, which sets pause time before and after. - perspective
- The perspective property defines how far an element is placed from the view on the z-axis, from the screen to the viewer. Perspective defines how an object is viewed. In graphic arts, perspective is the representation on a flat surface of what the viewer’s eye would see in a 3D space. (See Wikipedia for more information about graphical perspective and for related illustrations.) The illusion of perspective on a flat surface, such as a computer screen, is created by projecting points on the flat surface as they would appear if the flat surface were a window through which the viewer was looking at the object. In discussion of virtual environments, this flat surface is called a projection plane.
- perspective-origin
- The perspective-origin property establishes the origin for the perspective property. It effectively sets the X and Y position at which the viewer appears to be looking at the children of the element. When used with perspective, perspective-origin changes the appearance of an object, as if a viewer were looking at it from a different origin. An object appears differently if a viewer is looking directly at it versus looking at it from below, above, or from the side. Thus, the perspective-origin is like a vanishing point. The default value of perspective-origin is 50% 50%. This displays an object as if the viewer’s eye were positioned directly at the center of the screen, both top-to-bottom and left-to-right. A value of 0% 0% changes the object as if the viewer was looking toward the top left angle. A value of 100% 100% changes the appearance as if viewed toward the bottom right angle.
- pointer-events
- The pointer-events property allows you to control whether an element can be the target for the pointing device (e.g, mouse, pen) events.
- position
- The position property controls the type of positioning used by an element within its parent elements. The effect of the position property depends on a lot of factors, for example the position property of parent elements.
- punctuation-trim
- Obsolete: unsupported. This property determines whether or not a full-width punctuation mark character should be trimmed if it appears at the beginning of a line, so that its “ink” lines up with the first glyph in the line above and below.
- quotes
- Sets the type of quotation marks for embedded quotations.
- region-fragment
- Controls whether the last region in a chain displays additional ‘overset’ content according its default overflow property, or if it displays a fragment of content as if it were flowing into a subsequent region.
- rest
- The
rest
property determines how long a speech media agent should pause in between presenting an element’s main content and presenting the before and after cue sounds. It is a shorthand for therest-before
andrest-after
properties. - rest-after
- The
rest-after
property determines how long a speech media agent should pause after presenting an element’s main content, before presenting that element’s exit cue sound. It may be replaced by the shorthand propertyrest
, which sets rest time before and after. - rest-before
- The
rest-before
property determines how long a speech media agent should pause after presenting an intro cue sound for an element, before presenting that element’s main content. It may be replaced by the shorthand propertyrest
, which sets rest time before and after. - right
- Specifies the position an element in relation to the right side of the containing element.
- shape-image-threshold
- Defines the alpha channel threshold used to extract a shape from an image. Can be thought of as a “minimum opacity” threshold; that is, a value of 0.5 means that the shape will enclose all the pixels that are more than 50% opaque.
- shape-margin
- Adds a margin to a shape-outside. In effect, defines a new shape that is the smallest contour around all the points that are the shape-margin distance outward perpendicular to each point on the underlying shape. For points where a perpendicular direction is not defined (e.g., a triangle corner), takes all points on a circle centered at the point and with a radius of the shape-margin distance. This property accepts only non-negative values.
- shape-outside
- Declares a shape around which text should be wrapped, with possible modifications from the shape-margin property. The shape defined by shape-outside and shape-margin changes the geometry of a float element’s float area.
- speak
The
speak
property determines whether or not a speech synthesizer will read aloud the contents of an element.- speak-as
The
speak-as
property determines how the speech synthesizer interprets the content: words as whole words or as a sequence of letters, numbers as a numerical value or a sequence of digits, punctuation as pauses in speech or named punctuation characters.- tab-size
The tab-size CSS property is used to customise the width of a tab (U+0009) character.
- table layout
The ‘table-layout’ property controls the algorithm used to lay out the table cells, rows, and columns.
- text-align
The
text-align
CSS property describes how inline content like text is aligned in its parent block element. text-align does not control the alignment of block elements itself, only their inline content.- text-align-last
The
text-align-last
CSS property describes how the last line of a block element or a line before line break is aligned in its parent block element.- text-autospace
When non-ideographic characters (such as numbers) are presented alongside ideographic characters, many designers prefer to include spacing to separate it from the surrounding ideographs. This property automates the creation of that space by introducing an in-line margin, the width of which corresponds to the width of existing ideographs.
- text-decoration
The text-decoration CSS property is used to set the text formatting to underline, overline, line-through or blink.
underline and overline decorations are positioned under the text, line-through over it.
- text-decoration-color
- Sets the color of any text decoration, such as underlines, overlines, and strike throughs.
- text-decoration-line
- Sets what kind of line decorations are added to an element, such as underlines, overlines, etc.
text-decoration-line-through
:
- text-decoration-skip
- Specifies what parts of an element’s content are skipped over when applying any text decoration.
- text-decoration-style
- This property specifies the style of the text decoration line drawn on the specified element. The intended meaning for the values are the same as those of the border-style-properties.
- text-emphasis
- The text-emphasis property will apply special emphasis marks to the elements text. Slightly similar to the text-decoration property only that this property can have affect on the line-height. It also is noted that this is shorthand for text-emphasis-style and for text-emphasis-color.
- text-emphasis-color
- The text-emphasis-color property specifies the foreground color of the emphasis marks.
- text-emphasis-style
- The
text-emphasis-style
property applies special emphasis marks to an element’s text. - text-height
- This property helps determine an inline box’s block-progression dimension, derived from the text-height and font-size properties for non-replaced elements, the height or the width for replaced elements, and the stacked block-progression dimension for inline-block elements. The block-progression dimension determines the position of the padding, border and margin for the element.
- text-indent
- Specifies the amount of space horizontally that should be left on the first line of the text of an element. This horizontal spacing is at the beginning of the first line and is in respect to the left edge of the containing block box.
- text-justify
- The
text-justify
CSS property offers a fine level of justification control over the enclosed content, allowing for a variety of sophisticated justification models used in different language writing systems.
- text-line-through
- The text-line-through property is a shorthand property for text-line-through-style, text-line-through-color and text-line-through-mode. (Considered obsolete; use text-decoration instead.)
- text-line-through-color
- Specifies the line colors for the line-through text decoration. (Considered obsolete; use text-decoration-color instead.)
- text-line-through-style
- Specifies the line style for line-through text decoration. (Considered obsolete; use text-decoration-style instead.)
- text-line-through-width
- Specifies the line width for the line-through text decoration.
- text-overflow
- The text-overflow shorthand CSS property determines how overflowed content that is not displayed is signaled to the users. It can be clipped, display an ellipsis ('…’, U+2026 HORIZONTAL ELLIPSIS) or a Web author-defined string. It covers the two long-hand properties text-overflow-mode and text-overflow-ellipsis
- text-overflow-ellipsis
- The text-overflow-ellipsis CSS property controls how the hint on overflowed content that is not displayed is signaled to the users. The presence of the hint is controlled with CSS property text-overflow-mode. Shorthand property is text-overflow.
- text-overflow-mode
- The text-overflow-mode CSS property controls the presence and position of the hint on overflowed content that is not displayed is signaled to the users. The constitution of the hint is controlled with CSS property text-overflow-ellipsis. Shorthand property is text-overflow.
- text-overline
- The text-overline property is the shorthand for the text-overline-style, text-overline-width, text-overline-color, and text-overline-mode properties.
- text-overline-color
- Specifies the line color for the overline text decoration.
- text-overline-mode
- Sets the mode for the overline text decoration, determining whether the text decoration affects the space characters or not.
- text-overline-style
- Specifies the line style for overline text decoration.
- text-overline-width
- Specifies the line width for the overline text decoration.
- text-rendering
- The text-rendering CSS property provides information to the browser about how to optimize when rendering text. Options are: legibility, speed or geometric precision.
- text-shadow
- The CSS
text-shadow
property applies one or more drop shadows to the text and<text-decorations>
of an element. Each shadow is specified as an offset from the text, along with optional color and blur radius values. - text-transform
- This property transforms text for styling purposes. (It has no effect on the underlying content.)
- text-underline
- Unsupported. The ‘text-underline’ property is the shorthand for 'text-underline-style’, 'text-underline-width’, 'text-underline-color’, ‘text-underline-mode’ and 'text-underline-position’.
- top
- This property specifies how far an absolutely positioned box’s top margin edge is offset below the top edge of the box’s containing block. For relatively positioned boxes, the offset is with respect to the top edges of the box itself (i.e., the box is given a position in the normal flow, then offset from that position according to these properties).
- touch-action
- Determines whether touch input may trigger default behavior supplied by the user agent, such as panning or zooming.
- transform
- CSS transforms allow elements styled with CSS to be transformed in two-dimensional or three-dimensional space. Using this property, elements can be translated, rotated, scaled, and skewed. The value list may consist of 2D and/or 3D transform values.
- transform-origin
- This property defines the origin of the transformation axes relative to the element to which the transformation is applied.
- transform-origin-z
- This property allows you to define the relative position of the origin of the transformation grid along the z-axis.
- transform-style
- This property specifies how nested elements are rendered in 3D space relative to their parent.
- transition
- The transition CSS property is a shorthand property for transition-property, transition-duration, transition-timing-function, and transition-delay. It allows to define the transition between two states of an element.
- transition-delay
- Defines when the transition will start. A value of ‘0s’ means the transition will execute as soon as the property is changed. Otherwise, the value specifies an offset from the moment the property is changed, and the transition will delay execution by that offset.
- transition-duration
- The ‘transition-duration’ property specifies the length of time a transition animation takes to complete.
- transition-timing-function
- Sets the pace of action within a transition
- unicode-bidi
- The
unicode-bidi
CSS property specifies the level of embedding with respect to the bidirectional algorithm. - user-focus
- This is for all the high level UX stuff.
- user-modify
- Needs content
- user-select
- Controls the visible highlighting of selections of text and elements. It is possible to blind out selection completely or to allow the selection of text only.
- vertical-align
- The
vertical-align
property controls how inline elements or text are vertically aligned compared to the baseline. If this property is used on table-cells it controls the vertical alignment of content of the table cell. - voice-balance
- The
voice-balance
property sets the apparent position (in stereo sound) of the synthesized voice for spoken media. - voice-duration
- The
voice-duration
property allows the author to explicitly set the amount of time it should take a speech synthesizer to read an element’s content, for example to allow the speech to be synchronized with other media. With a value ofauto
(the default) the length of time it takes to read the content is determined by the content itself and thevoice-rate
property. - voice-family
- The
voice-family
property sets the speaker’s voice used by a speech media agent to read an element. The speaker may be specified as a named character (to match a voice option in the speech reading software) or as a generic description of the age and gender of the voice. Similar to thefont-family
property for visual media, a comma-separated list of fallback options may be given in case the speech reader does not recognize the character name or cannot synthesize the requested combination of generic properties. - voice-pitch
- The
voice-pitch
property sets pitch or tone (high or low) for the synthesized speech when reading an element; the pitch may be specified absolutely or relative to the normal pitch for thevoice-family
used to read the text. - voice-range
- The
voice-range
property determines how much variation in pitch or tone will be created by the speech synthesize when reading an element. Emphasized text, grammatical structures and punctuation may all be rendered as changes in pitch, this property determines how strong or obvious those changes are; large ranges are associated with enthusiastic or emotional speech, while small ranges are associated with flat or mechanical speech. - voice-rate
- The
voice-rate
property sets the speed at which the voice synthesized by a speech media agent will read content. - voice-stress
- The
voice-stress
property sets the level of vocal emphasis to be used for synthesized speech reading the element. - voice-volume
- The
voice-volume
property sets the volume for spoken content in speech media. It replaces the deprecatedvolume
property. - white-space
- The white-space property controls whether and how white space inside the element is collapsed, and whether lines may wrap at unforced “soft wrap” opportunities.
- white-space-treatment
- Obsolete: unsupported.
- widows
- Defines the minimum number of lines that can appear in the beginning of a new page. In typography, a widow is the last line of a paragraph appearing alone at the top of a page, which is considered to look awkward. Setting the widows property to an integer higher than 1 prevents this. On a non-paged media, like screen, the widows CSS property has no effect. It can have a number value or it can inherit the values from the parent element.
- width
- Specifies the width of the content area of an element. The content area of the element width does not include the padding, border, and margin of the element.
- word-break
- The word-break property is often used when there is long generated content that is strung together without and spaces or hyphens to beak apart. A common case of this is when there is a long URL that does not have any hyphens. This case could potentially cause the breaking of the layout as it could extend past the parent element.
- word-spacing
- The
word-spacing
CSS property specifies the spacing behavior between "words". - word-wrap
- An alias of css/properties/overflow-wrap, word-wrap defines whether to break words when the content exceeds the boundaries of its container.
- wrap-flow
- Specifies how exclusions affect inline content within block-level elements. Elements lay out their inline content in their content area but wrap around exclusion areas.
- wrap-margin
- Set the value that is used to offset the inner wrap shape from other shapes. Inline content that intersects a shape with this property will be pushed by this shape’s margin.
- wrap-option
- Obsolete and unsupported. Do not use. This CSS property controls the text when it reaches the end of the block in which it is enclosed.
- wrap-through
- Specifies whether an element inherits its parent’s wrapping context as defined by the wrap-flow property.
- writing-mode
writing-mode
specifies if lines of text are laid out horizontally or vertically, and the direction which lines of text and blocks progress.- z-index
- The z-index property controls the stacking order of elements. As the x-axis defines the horizontal (left-right) position of elements on the screen, and the y-axis defines the vertical (top-down) position, think of the z-axis as the third dimension or depth-of-field, rising “out of” the screen, towards the viewer, or descending “into” the screen, away from the viewer.