CSS properties are the key to altering the styling of HTML elements in your web documents.
- Selects a normal, or small-caps face from a font family. Also possible by using the font shorthand.
- 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.
- 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.
- 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.
- Allows the default alignment to be overridden for individual flex items.
- 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.
- Specifies the treatment of all consecutive white space characters (with no exception for line feed characters).
- Shorthand property to define a CSS animation, setting all parameters at once.
- Defines a length of time to elapse before an animation starts, allowing an animation to begin execution some time after it is applied.
- Defines whether an animation should run in reverse on some or all cycles.
- Defines the length of time an animation takes to complete one cycle.
- 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.
- Specifies how many times an animation cycle should play.
- Defines the list of animations that apply to the element.
- Defines whether an animation is running or paused.
- Describes how the animation will progress over one cycle of its duration.
- Allows changing the style of any element to platform-based interface elements or vice versa.
- Determines whether or not the “back” side of a transformed element is visible when facing the viewer.
- 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.
- Defines if a background image scrolls with the content or stays fixed.
- 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.
- Specifies how an element’s background is clipped.
- Sets a color to fill up the background of an element it is applied to and accepts any valid CSS color.
- 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.
- Specifies what the background-position property is relative to.
background-positionallows you to set the placement of a
background-imageon the element it is applied to.
background-positiongenerally takes two values, which set the horizontal and vertical position of the background image inside the element.
- Sets the horizontal position of a background image.
- Sets vertical starting position of a background image.
- Background-repeat defines if and how background images will be repeated after they have been sized and positioned
- Specifies the size of the background images.
- Obsolete - spec retired, not implemented.
- Non standard. Sets or retrieves the location of the Dynamic HTML (DHTML) behavior.
- Sets the block progression and layout orientation: deprecated in favor of the writing-mode property.
- 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.
- 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.
- 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.
- Defines the shape of the border of the bottom-left corner.
- Defines the shape of the border of the bottom-right corner.
- 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.
- 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 can be used for collapsing the borders between table cells
- 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:
- 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.
- 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-outsetproperty describes, by which amount the border image area extends beyond the border box.
border-image-repeatCSS 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.
- 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.
- The property
border-image-sourceis used to set the image to be used instead of the border style. If this is set to
border-styleis used instead.
border-image-widthCSS 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.
- 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.
- 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.
- 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.
- 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.
- 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.
- 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.
- 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.
- 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.
- 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.
- Specifies the distance between the borders of adjacent cells.
- 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.
- 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.
- 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.
- Sets the rounding of the top-left corner of the element.
- Sets the rounding of the top-right corner of the element.
- 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.
- 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.
- 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.
- Sets the position of the bottom edge of an element.
- 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.
- Do not use. This property has been replaced by the flex property.
- 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.
- 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.
- Do not use. This property has been replaced by flex-pack.
box-shadowproperty programmatically creates one or more shadows on the inside or outside of a block level element.
box-sizingproperty 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.
- 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.
- Control page/column/region breaks that fall above a block of content
- Control page/column/region breaks that fall within a block of content
- Specifies the placement of a table caption.
- 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.
- 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.
- The clip-path property prevents a portion of an element from drawing by defining a clipping region.
- 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.
- 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).
Specifies the number of columns an element should be divided into.
Specifies how to fill columns (balanced or sequential).
column-gapproperty controls the width of the gap between columns in multi-column elements.
Sets the width, style, and color of the rule between columns.
Specifies the color of the rule between columns.
Specifies the style of the rule between columns. The column-rule-style values are the same as for border-style.
column-spanCSS 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.
Specifies the width of columns in multi-column elements.
The content property is used to display content in the pseudo-elements ::before and ::after.
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).
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.
cueproperty 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 the
cue-beforeproperty 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 property
cuesets cue sounds for both before and after the element is presented.
The cursor CSS property specifies the mouse cursor displayed when the mouse pointer is over an element.
directionCSS property specifies the text direction/writing direction. The
rtlis used for Hebrew or Arabic text, the
ltris for other languages.
This property specifies the type of rendering box used for an element. It is a shorthand property for many other display properties.
Sets whether or not to display borders and background on empty cells in a table.
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’ specifies the opacity of the painting operation used to paint the interior the current object. (See Painting shapes and text.)
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:
Applies various image processing effects. This property is largely unsupported. See Compatibility section for more information.
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.
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.
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).
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.
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.
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.
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.
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.
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.
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.
Elements which have the style
floatare floated horizontally. These elements can move as far to the
rightof 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.
fontproperty 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-familyproperty 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-settingsproperty 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-kerningproperty 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’property allows authors to explicitly specify the language system of the font, overriding the language system implied by the content language.
font-sizesets 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-adjustproperty 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.
Allows you to expand or condense the widths for a normal, condensed, or expanded font face.
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-weightproperty 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.
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.
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.
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.
Specifies the automatic default location if a grid container does not specify automatic-placement strategy via grid-auto-flow.
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.
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.
Specifies the column position to place a grid item based upon integer location, string value, or column size.
See css/properties/grid-column. This property has been removed from the specification.
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)
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’.
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’.
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.
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
- 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.
- Shorthand for setting grid-template-columns, grid-template-rows, and grid-template-areas in a single declaration.
- 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.
- 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.
- 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.
- Sets the height of an element. The content area of the element height does not include the padding, border, and margin of the element.
- 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.
- Sets the left edge of an element
- The line-height property specifies the height of an inline block level element. The value of the line-height property cannot be negative.
- Shorthand property that sets the
list-style-imageproperties in one declaration.
- 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
- Specifies if the list-item markers should appear inside or outside the content flow.
- Specifies the type of list-item marker in a list.
marginproperty is shorthand to allow you to set all four margins of an element at once. Its equivalent longhand properties are
margin-left. Negative values are also allowed.
margin-bottomsets the bottom margin of an element.
margin-leftsets the left margin of an element.
margin-rightsets the right margin of an element.
margin-topsets the top margin of an element.
marquee-directiondetermines the initial direction in which the marquee content moves.
- This property specifies how many times the marquee content moves.
marquee-speeddetermines how fast the marquee content scrolls.
- 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.
- 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.
- 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.
- 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.
- 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.
- 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.
- 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.
- This property sets the mask image or the mask source of an element.
- This property indicates whether the <mask-reference> is treated as a luminescence mask or as an alpha mask.
- 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.
- Specifies how mask images are tiled (repeated) after they have been sized and positioned.
- Specifies the size of the mask images, similar to the CSS background-size property.
- Defines whether the content of the <mask> element is treated as as luminance mask or an alpha mask.
- 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.
- Sets the maximum width for an element. It limits the width property to be larger than the value specified in max-width.
- Sets the minimum width of an element. It limits the width property to be not smaller than the value specified in min-width.
- 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.
- 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.
- The order property controls the order in which flex items appear within their flex container, by assigning them to ordinal groups.
- 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.
- The CSS
outlineproperty 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.
- 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.
- The outline-offset property offsets the outline and draw it beyond the border edge.
- 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.
- 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.
overflowproperty 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.
- Specifies the preferred scrolling methods for elements that overflow.
- 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-xproperty is a specific case of the generic
overflowproperty. It controls how extra content exceeding the x-axis of the bounding box of an element is rendered.
overflow-yproperty is a specific case of the generic
overflowproperty. It controls how extra content exceeding the y-axis of the bounding box of an element is rendered.
paddingoptional 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. The
paddingproperty is a shorthand to avoid setting each side separately (padding-top, padding-right, padding-bottom, padding-left).
padding-bottomCSS 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 of
padding-leftCSS 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 of
padding-rightCSS 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 of
padding-topCSS 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 of
- 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.
- 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.
- 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.
pauseproperty determines how long a speech media agent should pause before and after presenting an element. It is a shorthand for the
pause-afterproperty determines how long a speech media agent should pause after presenting an element. It may be replaced by the shorthand property
pause, which sets pause time before and after.
pause-beforeproperty determines how long a speech media agent should pause before presenting an element. It may be replaced by the shorthand property
pause, which sets pause time before and after.
- 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.
- 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.
- The pointer-events property allows you to control whether an element can be the target for the pointing device (e.g, mouse, pen) events.
- 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.
- 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.
- Sets the type of quotation marks for embedded quotations.
- 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.
restproperty 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 the
rest-afterproperty 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 property
rest, which sets rest time before and after.
rest-beforeproperty 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 property
rest, which sets rest time before and after.
- Specifies the position an element in relation to the right side of the containing element.
- 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.
- 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.
- 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.
speakproperty determines whether or not a speech synthesizer will read aloud the contents of an element.
speak-asproperty 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.
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-alignCSS 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-lastCSS property describes how the last line of a block element or a line before line break is aligned in its parent block element.
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.
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.
- Sets the color of any text decoration, such as underlines, overlines, and strike throughs.
- Sets what kind of line decorations are added to an element, such as underlines, overlines, etc.
- Specifies what parts of an element’s content are skipped over when applying any text decoration.
- 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.
- 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.
- The text-emphasis-color property specifies the foreground color of the emphasis marks.
text-emphasis-styleproperty applies special emphasis marks to an element’s text.
- 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.
- 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-justifyCSS 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.
- 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.)
- Specifies the line colors for the line-through text decoration. (Considered obsolete; use text-decoration-color instead.)
- Specifies the line style for line-through text decoration. (Considered obsolete; use text-decoration-style instead.)
- Specifies the line width for the line-through text decoration.
- 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
- 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.
- 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.
- The text-overline property is the shorthand for the text-overline-style, text-overline-width, text-overline-color, and text-overline-mode properties.
- Specifies the line color for the overline text decoration.
- Sets the mode for the overline text decoration, determining whether the text decoration affects the space characters or not.
- Specifies the line style for overline text decoration.
- Specifies the line width for the overline text decoration.
- The text-rendering CSS property provides information to the browser about how to optimize when rendering text. Options are: legibility, speed or geometric precision.
- The CSS
text-shadowproperty 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.
- This property transforms text for styling purposes. (It has no effect on the underlying content.)
- 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’.
- 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).
- Determines whether touch input may trigger default behavior supplied by the user agent, such as panning or zooming.
- 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.
- This property defines the origin of the transformation axes relative to the element to which the transformation is applied.
- This property allows you to define the relative position of the origin of the transformation grid along the z-axis.
- This property specifies how nested elements are rendered in 3D space relative to their parent.
- 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.
- 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.
- The ‘transition-duration’ property specifies the length of time a transition animation takes to complete.
- Sets the pace of action within a transition
unicode-bidiCSS property specifies the level of embedding with respect to the bidirectional algorithm.
- This is for all the high level UX stuff.
- Needs content
- 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-alignproperty 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-balanceproperty sets the apparent position (in stereo sound) of the synthesized voice for spoken media.
voice-durationproperty 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 of
auto(the default) the length of time it takes to read the content is determined by the content itself and the
voice-familyproperty 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 the
font-familyproperty 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-pitchproperty 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 the
voice-familyused to read the text.
voice-rangeproperty 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-rateproperty sets the speed at which the voice synthesized by a speech media agent will read content.
voice-stressproperty sets the level of vocal emphasis to be used for synthesized speech reading the element.
voice-volumeproperty sets the volume for spoken content in speech media. It replaces the deprecated
- 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.
- Obsolete: unsupported.
- 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.
- 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.
- 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-spacingCSS property specifies the spacing behavior between "words".
- An alias of css/properties/overflow-wrap, word-wrap defines whether to break words when the content exceeds the boundaries of its container.
- 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.
- 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.
- 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.
- Specifies whether an element inherits its parent’s wrapping context as defined by the wrap-flow property.
writing-modespecifies if lines of text are laid out horizontally or vertically, and the direction which lines of text and blocks progress.
- 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.