The properties that style list markers, keep counters, insert generated content and control table layout. Custom marker styles are defined with @counter-style; display: table and the other table display types are under Box model.
Lists
list-style
Shorthand for list-style-type, list-style-position and list-style-image, in any order.
list-style: none sets both the type and the image to none, removing the markers. Safari with VoiceOver then stops announcing the element as a list; add role="list" to the <ul> or <ol> if that matters.
A bare list for navigation or cards: no markers and no indent.
list-style-type
The marker drawn for each list item. A <counter-style> is a built-in style name (disc, circle, square, decimal, lower-roman, upper-alpha …) or one defined with @counter-style; a <string> is used as the marker exactly as written.
A counter style by name, and a fixed string marker.
list-style-position
Whether the marker sits outside the list item's box, in the margin, or inside it as the first inline content, so that wrapped lines run under the marker.
The image is drawn at its natural size. For control over size and alignment, style the ::marker pseudo-element or use a background image instead.
Counters
counter-reset
Creates one or more new counters on the element, each starting at the given integer (0 if omitted). Descendants and later siblings see the new counter, and the counter() and counters() functions print its value in content.
A <reversed-counter-name> is reversed(name): a counter that counts down, starting by default from the number of items. List items use a built-in counter called list-item, which these properties can also reset and change.
Adds to one or more counters each time the element appears. The integer is the step (1 if omitted) and can be negative. If no counter of that name is in scope, a new one is created at 0 first.
On one element, counters are reset first, then set, then incremented.
Generated content
content
The content generated for ::before, ::after and ::marker, or a replacement for an element's own content. A <content-list> is a run of strings, images, counter(), counters(), attr() and the quote keywords open-quote, close-quote, no-open-quote and no-close-quote.
On ::before and ::after this means no box; on an element, its usual content.
none
No generated content; the pseudo-element is not created.
<content-list>
The listed strings, images, counters and attribute values, run together as inline content.
<content-replacement>
A single <image> that replaces the element's content, making it behave like a replaced element.
/ <alt-text>
Strings or counters giving the text that assistive technology reads in place of the generated content. An empty string marks it as decorative.
a[target=_blank]::after { content: ' ↗' / ' (opens in a new tab)'; }
A visual arrow, with a spoken description for screen readers.
quotes
The quotation marks that open-quote and close-quote insert, for example around <q> elements. Each pair of strings is one nesting level: the first pair for outer quotes, the next for quotes inside them.
auto picks marks suited to the content language set by lang. none makes the quote keywords insert nothing.
q { quotes: '«' '»' '‹' '›'; }
Guillemets for outer quotes, single guillemets for quotes inside them.
Tables
border-collapse
Chooses between the separated borders model, where each cell has its own border with space between, and the collapsing model, where adjacent cells share a single border.
Single 1px grid lines between cells instead of doubled borders.
border-spacing
The gap between the borders of adjacent cells in the separated borders model. One length sets both directions; two set the horizontal then the vertical gap.
Chooses how column widths are worked out. auto sizes columns to fit the content of every cell. fixed takes the widths from the table and its first row only, so the table lays out faster and long content cannot widen a column.