12.2 The 'content' property

Chapter 12 - Generated content, automatic numbering, and lists - 12.2 The 'content' property

Go to the relevant page of the specification.

before-after-011
CSS table model and generated content: Basics
before-after-dynamic-attr-001 (dom)
generated content
before-after-dynamic-restyle-001 (dom)
generated content
before-after-images-001
generated content
before-after-table-whitespace-001
generated content
bidi-generated-content-001
content: with character forced bidi - rlo
A right-to-left override should be applied when u+202E is inserted through the content property
bidi-generated-content-002
content: with character forced bidi - lro
A left-to-right override should be correctly applied when inserted through the content property
content-001
Content with the value of 'none'
The 'content' property properly handles a value of 'none'.
content-002
Content with the value of 'normal'
The 'content' property properly handles a value of 'normal'.
content-003
Content with a string as the value
The 'content' property properly handles a string as a value.
content-004 (image)
Content with a url() to an image as a value
The 'content' property properly handles the 'url()' function as a value.
content-005
Content with a 'counter()' function as a value
The 'content' property properly handles a 'counter()' function as a value.
content-006
Content using a 'counter()' function with a list style set to 'disc'
The 'content' property properly handles a 'counter()' function with a list-style.
content-007
Content using a 'counter()' function with a list style set to 'circle'
The 'content' property properly handles a 'counter()' function with a list-style.
content-008
Content using a 'counter()' function with a list style set to 'square'
The 'content' property properly handles a 'counter()' function with a list-style.
content-009
Content using a 'counter()' function with a list style set to 'decimal'
The 'content' property properly handles a 'counter()' function with a list-style.
content-010
Content using a 'counter()' function with a list style set to 'decimal-leading-zero'
The 'content' property properly handles a 'counter()' function with a list-style.
content-011
Content using a 'counter()' function with a list style set to 'lower-roman'
The 'content' property properly handles a 'counter()' function with a list-style.
content-012
Content using a 'counter()' function with a list style set to 'upper-roman'
The 'content' property properly handles a 'counter()' function with a list-style.
content-013
Content using a 'counter()' function with a list style set to 'lower-greek'
The 'content' property properly handles a 'counter()' function with a list-style.
content-014
Content using a 'counter()' function with a list style set to 'lower-latin'
The 'content' property properly handles a 'counter()' function with a list-style.
content-015
Content using a 'counter()' function with a list style set to 'upper-latin'
The 'content' property properly handles a 'counter()' function with a list-style.
content-016
Content using a 'counter()' function with a list style set to 'armenian'
The 'content' property properly handles a 'counter()' function with a list-style.
content-017
Content using a 'counter()' function with a list style set to 'georgian'
The 'content' property properly handles a 'counter()' function with a list-style.
content-018
Content using a 'counter()' function with a list style set to 'lower-alpha'
The 'content' property properly handles a 'counter()' function with a list-style.
content-019
Content using a 'counter()' function with a list style set to 'upper-alpha'
The 'content' property properly handles a 'counter()' function with a list-style.
content-020
Content using a 'counter()' function with a list style set to 'none'
The 'content' property properly handles a 'counter()' function with a list-style.
content-021
Content using a 'counters()' function with a string value
The 'content' property properly handles a 'counters()' function with a string value.
content-022
Content using a 'counters()' function with a string and a list style set to 'disc'
The 'content' property properly handles a 'counters()' function with a string and a list style.
content-023
Content using a 'counters()' function with a string and a list style set to 'circle'
The 'content' property properly handles a 'counters()' function with a string and a list style.
content-024
Content using a 'counters()' function with a string and a list style set to 'square'
The 'content' property properly handles a 'counters()' function with a string and a list style.
content-025
Content using a 'counters()' function with a string and a list style set to 'decimal'
The 'content' property properly handles a 'counters()' function with a string and a list style.
content-026
Content using a 'counters()' function with a string and a list style set to 'decimal-leading-zero'
The 'content' property properly handles a 'counters()' function with a string and a list style.
content-027
Content using a 'counters()' function with a string and a list style set to 'lower-roman'
The 'content' property properly handles a 'counters()' function with a string and a list style.
content-028
Content using a 'counters()' function with a string and a list style set to 'upper-roman'
The 'content' property properly handles a 'counters()' function with a string and a list style.
content-029
Content using a 'counters()' function with a string and a list style set to 'lower-greek'
The 'content' property properly handles a 'counters()' function with a string and a list style.
content-030
Content using a 'counters()' function with a string and a list style set to 'lower-latin'
The 'content' property properly handles a 'counters()' function with a string and a list style.
content-031
Content using a 'counters()' function with a string and a list style set to 'upper-latin'
The 'content' property properly handles a 'counters()' function with a string and a list style.
content-032
Content using a 'counters()' function with a string and a list style set to 'armenian'
The 'content' property properly handles a 'counters()' function with a string and a list style.
content-033
Content using a 'counters()' function with a string and a list style set to 'georgian'
The 'content' property properly handles a 'counters()' function with a string and a list style.
content-034
Content using a 'counters()' function with a string and a list style set to 'lower-alpha'
The 'content' property properly handles a 'counters()' function with a string and a list style.
content-035
Content using a 'counters()' function with a string and a list style set to 'upper-alpha'
The 'content' property properly handles a 'counters()' function with a string and a list style.
content-036
Content using a 'counters()' function with a string and a list style set to 'none'
The 'content' property properly handles a 'counters()' function with a string and a list style.
content-037
Content with a 'attr()' function as a value selecting 'abbr'
The 'content' property correctly handles the 'attr()' function when calling the attribute 'abbr'.
content-038
Content with a 'attr()' function as a value selecting 'accept-charset'
The 'content' property correctly handles the 'attr()' function when calling the attribute 'accept-charset'.
content-039
Content with a 'attr()' function as a value selecting 'accept'
The 'content' property correctly handles the 'attr()' function when calling the attribute 'accept'.
content-040
Content with a 'attr()' function as a value selecting 'accesskey'
The 'content' property correctly handles the 'attr()' function when calling the attribute 'accesskey'.
content-041
Content with a 'attr()' function as a value selecting 'action'
The 'content' property correctly handles the 'attr()' function when calling the attribute 'action'.
content-042
Content with a 'attr()' function as a value selecting 'align'
The 'content' property correctly handles the 'attr()' function when calling the attribute 'align'.
content-043
Content with a 'attr()' function as a value selecting 'alink'
The 'content' property correctly handles the 'attr()' function when calling the attribute 'alink'.
content-046
Content with a 'attr()' function as a value selecting 'axis'
The 'content' property correctly handles the 'attr()' function when calling the attribute 'axis'.
content-047
Content with a 'attr()' function as a value selecting 'background'
The 'content' property correctly handles the 'attr()' function when calling the attribute 'background'.
content-048
Content with a 'attr()' function as a value selecting 'bgcolor'
The 'content' property correctly handles the 'attr()' function when calling the attribute 'bgcolor'.
content-049
Content with a 'attr()' function as a value selecting 'border'
The 'content' property correctly handles the 'attr()' function when calling the attribute 'border'.
content-050
Content with a 'attr()' function as a value selecting 'cellpadding'
The 'content' property correctly handles the 'attr()' function when calling the attribute 'cellpadding'.
content-051
Content with a 'attr()' function as a value selecting 'cellspacing'
The 'content' property correctly handles the 'attr()' function when calling the attribute 'cellspacing'.
content-052
Content with a 'attr()' function as a value selecting 'char'
The 'content' property correctly handles the 'attr()' function when calling the attribute 'char'.
content-053
Content with a 'attr()' function as a value selecting 'charoff'
The 'content' property correctly handles the 'attr()' function when calling the attribute 'charoff'.
content-054
Content with a 'attr()' function as a value selecting 'charset'
The 'content' property correctly handles the 'attr()' function when calling the attribute 'charset'.
content-056
Content with a 'attr()' function as a value selecting 'cite'
The 'content' property correctly handles the 'attr()' function when calling the attribute 'cite'.
content-057
Content with a 'attr()' function as a value selecting 'class'
The 'content' property properly handles the 'attr()' function when calling the attribute 'class'.
content-063
Content with a 'attr()' function as a value selecting 'color'
The 'content' property correctly handles the 'attr()' function when calling the attribute 'color'.
content-065
Content with a 'attr()' function as a value selecting 'colspan'
The 'content' property correctly handles the 'attr()' function when calling the attribute 'colspan'.
content-066 (HTMLonly)
Content with a 'attr()' function as a value selecting 'compact'
The 'content' property correctly handles the 'attr()' function when calling the attribute 'compact'.
content-067
Content with a 'attr()' function as a value selecting 'content'
The 'content' property correctly handles the 'attr()' function when calling the attribute 'content'.
content-068
Content with a 'attr()' function as a value selecting 'coords'
The 'content' property correctly handles the 'attr()' function when calling the attribute 'coords'.
content-070
Content with a 'attr()' function as a value selecting 'datetime'
The 'content' property correctly handles the 'attr()' function when calling the attribute 'datetime'.
content-072
Content with a 'attr()' function as a value selecting 'defer'
The 'content' property correctly handles the 'attr()' function when calling the attribute 'defer'.
content-073
Content with a 'attr()' function as a value selecting 'dir'
The 'content' property properly handles the 'attr()' function when calling the attribute 'dir'.
content-075
Content with a 'attr()' function as a value selecting 'enctype'
The 'content' property properly handles the 'attr()' function when calling the attribute 'enctype'.
content-076
Content with a 'attr()' function as a value selecting 'face'
The 'content' property properly handles the 'attr()' function when calling the attribute 'face'.
content-077
Content with a 'attr()' function as a value selecting 'for'
The 'content' property properly handles the 'attr()' function when calling the attribute 'for'.
content-078
Content with a 'attr()' function as a value selecting 'frame'
The 'content' property properly handles the 'attr()' function when calling the attribute 'frame'.
content-080
Content with a 'attr()' function as a value selecting 'headers'
The 'content' property properly handles the 'attr()' function when calling the attribute 'headers'.
content-081 (HTMLonly)
Content with a 'attr()' function as a value selecting 'height'
The 'content' property properly handles the 'attr()' function when calling the attribute 'height'.
content-082
Content with a 'attr()' function as a value selecting 'href'
The 'content' property properly handles the 'attr()' function when calling the attribute 'href'.
content-083
Content with a 'attr()' function as a value selecting 'hreflang'
The 'content' property properly handles the 'attr()' function when calling the attribute 'hreflang'.
content-085
Content with a 'attr()' function as a value selecting 'http-equiv'
The 'content' property correctly handles the 'attr()' function when calling the attribute 'http-equiv'.
content-086
Content with a 'attr()' function as a value selecting 'id'
The 'content' property properly handles the 'attr()' function when calling the attribute 'id'.
content-089
Content with a 'attr()' function as a value selecting 'lang'
The 'content' property properly handles the 'attr()' function when calling the attribute 'lang'.
content-090 (HTMLonly)
Content with a 'attr()' function as a value selecting 'language'
The 'content' property properly handles the 'attr()' function when calling the attribute 'language'.
content-091 (HTMLonly)
Content with a 'attr()' function as a value selecting 'link'
The 'content' property properly handles the 'attr()' function when calling the attribute 'link'.
content-096
Content with a 'attr()' function as a value selecting 'media'
The 'content' property properly handles the 'attr()' function when calling the attribute 'media'.
content-097
Content with a 'attr()' function as a value selecting 'method'
The 'content' property properly handles the 'attr()' function when calling the attribute 'method'.
content-099
Content with a 'attr()' function as a value selecting 'name'
The 'content' property properly handles the 'attr()' function when calling the attribute 'name'.
content-100
Content with a 'attr()' function as a value selecting 'nohref'
The 'content' property properly handles the 'attr()' function when calling the attribute 'nohref'.
content-103
Content with a 'attr()' function as a value selecting 'nowrap'
The 'content' property properly handles the 'attr()' function when calling the attribute 'nowrap'.
content-105 (dom)
Content with a 'attr()' function as a value selecting 'onblur'
The 'content' property properly handles the 'attr()' function when calling the attribute 'onblur'.
content-107 (dom)
Content with a 'attr()' function as a value selecting 'onclick'
The 'content' property properly handles the 'attr()' function when calling the attribute 'onclick'.
content-108 (dom)
Content with a 'attr()' function as a value selecting 'ondblclick'
The 'content' property properly handles the 'attr()' function when calling the attribute 'ondblclick'.
content-109 (dom)
Content with a 'attr()' function as a value selecting 'onfocus'
The 'content' property properly handles the 'attr()' function when calling the attribute 'onfocus'.
content-110 (dom)
Content with a 'attr()' function as a value selecting 'onkeydown'
The 'content' property properly handles the 'attr()' function when calling the attribute 'onkeydown'.
content-111 (dom)
Content with a 'attr()' function as a value selecting 'onkeypress'
The 'content' property properly handles the 'attr()' function when calling the attribute 'onkeypress'.
content-112 (dom)
Content with a 'attr()' function as a value selecting 'onkeyup'
The 'content' property properly handles the 'attr()' function when calling the attribute 'onkeyup'.
content-113 (dom)
Content with a 'attr()' function as a value selecting 'onload'
The 'content' property properly handles the 'attr()' function when calling the attribute 'onload'.
content-114 (dom)
Content with a 'attr()' function as a value selecting 'onmousedown'
The 'content' property properly handles the 'attr()' function when calling the attribute 'onmousedown'.
content-115 (dom)
Content with a 'attr()' function as a value selecting 'onmousemove'
The 'content' property properly handles the 'attr()' function when calling the attribute 'onmousemove'.
content-116 (dom)
Content with a 'attr()' function as a value selecting 'onmouseout'
The 'content' property properly handles the 'attr()' function when calling the attribute 'onmouseout'.
content-117 (dom)
Content with a 'attr()' function as a value selecting 'onmouseover'
The 'content' property properly handles the 'attr()' function when calling the attribute 'onmouseover'.
content-118 (dom)
Content with a 'attr()' function as a value selecting 'onmouseup'
The 'content' property properly handles the 'attr()' function when calling the attribute 'onmouseup'.
content-119 (dom)
Content with a 'attr()' function as a value selecting 'onreset'
The 'content' property properly handles the 'attr()' function when calling the attribute 'onreset'.
content-121 (dom)
Content with a 'attr()' function as a value selecting 'onsubmit'
The 'content' property properly handles the 'attr()' function when calling the attribute 'onsubmit'.
content-122 (dom)
Content with a 'attr()' function as a value selecting 'onunload'
The 'content' property properly handles the 'attr()' function when calling the attribute 'onunload'.
content-123
Content with a 'attr()' function as a value selecting 'profile'
The 'content' property properly handles the 'attr()' function when calling the attribute 'profile'.
content-126
Content with a 'attr()' function as a value selecting 'rel'
The 'content' property properly handles the 'attr()' function when calling the attribute 'rel'.
content-127
Content with a 'attr()' function as a value selecting 'rev'
The 'content' property properly handles the 'attr()' function when calling the attribute 'rev'.
content-129
Content with a 'attr()' function as a value selecting 'rowspan'
The 'content' property properly handles the 'attr()' function when calling the attribute 'rowspan'.
content-130
Content with a 'attr()' function as a value selecting 'rules'
The 'content' property properly handles the 'attr()' function when calling the attribute 'rules'.
content-131
Content with a 'attr()' function as a value selecting 'scheme'
The 'content' property properly handles the 'attr()' function when calling the attribute 'scheme'.
content-132
Content with a 'attr()' function as a value selecting 'scope'
The 'content' property properly handles the 'attr()' function when calling the attribute 'scope'.
content-135
Content with a 'attr()' function as a value selecting 'shape'
The 'content' property properly handles the 'attr()' function when calling the attribute 'shape'.
content-136
Content with a 'attr()' function as a value selecting 'size'
The 'content' property properly handles the 'attr()' function when calling the attribute 'size'.
content-138
Content with a 'attr()' function as a value selecting 'src'
The 'content' property properly handles the 'attr()' function when calling the attribute 'src'.
content-140
Content with a 'attr()' function as a value selecting 'start'
The 'content' property properly handles the 'attr()' function when calling the attribute 'start'.
content-141
Content with a 'attr()' function as a value selecting 'style'
The 'content' property properly handles the 'attr()' function when calling the attribute 'style'.
content-142
Content with a 'attr()' function as a value selecting 'summary'
The 'content' property properly handles the 'attr()' function when calling the attribute 'summary'.
content-143
Content with a 'attr()' function as a value selecting 'tabindex'
The 'content' property properly handles the 'attr()' function when calling the attribute 'tabindex'.
content-144
Content with a 'attr()' function as a value selecting 'target'
The 'content' property properly handles the 'attr()' function when calling the attribute 'target'.
content-145
Content with a 'attr()' function as a value selecting 'text'
The 'content' property properly handles the 'attr()' function when calling the attribute 'text'.
content-146
Content with a 'attr()' function as a value selecting 'title'
The 'content' property properly handles the 'attr()' function when calling the attribute 'title'.
content-147
Content with a 'attr()' function as a value selecting 'type'
The 'content' property properly handles the 'attr()' function when calling the attribute 'type'.
content-149 (HTMLonly)
Content with a 'attr()' function as a value selecting 'valign'
The 'content' property properly handles the 'attr()' function when calling the attribute 'valign'.
content-150
Content with a 'attr()' function as a value selecting 'value'
The 'content' property properly handles the 'attr()' function when calling the attribute 'value'.
content-151
Content with a 'attr()' function as a value selecting 'valuetype'
The 'content' property properly handles the 'attr()' function when calling the attribute 'valuetype'.
content-152
Content with a 'attr()' function as a value selecting 'version'
The 'content' property properly handles the 'attr()' function when calling the attribute 'version'.
content-153 (HTMLonly)
Content with a 'attr()' function as a value selecting 'vlink'
The 'content' property properly handles the 'attr()' function when calling the attribute 'vlink'.
content-155
Content with a 'attr()' function as a value selecting 'width'
The 'content' property properly handles the 'attr()' function when calling the attribute 'width'.
content-156
Content with the value of 'open-quote'
The 'content' property properly handles an 'open-quote' value.
content-157
Content with the value of 'close-quote'
The 'content' property properly handles a 'close-quote' value.
content-158
Content with the value of 'no-open-quote'
The 'content' property properly handles a 'no-open-quote' value.
content-159
Content with the value of 'no-close-quote'
The 'content' property properly handles a 'no-close-quote' value.
content-160
Content with the value of 'inherit'
The 'content' property correctly handles an 'inherit' value.
content-applies-to-001
Content property works only with :before and :after
Content property only works in conjunction with the :before and :after pseudo-elements.
content-attr-001
Content property missing attr(x)
If attribute (x) does not exist then an empty string is returned for the attr(x) value.
content-attr-case-001 (HTMLonly)
Content property attr(x) case sensitivity
The attr(x) function selects the attribute even when case does not match.
content-attr-case-002 (nonHTML)
content attr(x) case sensitivity
Verify in XHTML that attr(x) does not select the attribute when the case does not match
content-auto-reset-001
Content property on out of scope counter
If content refers to a counter that is not in scope, it is assumed that a counter-reset has occurred and the counter is reset to zero.
content-newline-001
Content property \A creates newline
A '\A' creates a newline for strings in the content property.
content-uri-001 (image)
Content property with missing image
When the URI resource cannot be displayed the user agent needs to leave it out or display some indication that the resource cannot be displayed.
content-white-space-001
Content property and white-space: pre-line
'white-space: pre-line' applies to generated string content.
content-white-space-002
Content property and white-space: pre
'white-space: pre' applies to generated string content.
content-white-space-003
Content property and white-space: nowrap
'white-space: nowrap' applies to generated string content.
content-white-space-004
Content property and white-space: nowrap
'white-space: normal' applies to generated string content.
counter-increment-auto-reset-001
Counter-increment on out of scope counter
If a counter-increment refers to counter that is not in scope it assumes that a counter-reset has occurred and resets back to zero.
counter-increment-display-001
Counter-increment only on 'display: none' element
An element that is set to 'display: none' does not increment or create a counter.
counter-increment-display-002
Counter-increment on 'display: none' element
An element that is set to 'display: none' does not increment counters.
counter-increment-display-003
Counter-increment on pseudo-element and 'display: none' on element
An element that is set to 'display: none' does not increment counters when increment is on the pseudo-element.
counter-increment-display-004
Counter-increment on pseudo-element, 'display: none' on element and parent with counter-reset
An element that is set to 'display: none' does not increment counters when increment is on the pseudo-element.
counter-increment-multiple-001
Multiple counter-increment before counter use
If multiple increments are specified on the same counter then all of them occur in the order specified.
counter-increment-not-generated-001
Counter-increment on pseudo-element that is not generated
Pseudo-elements that are not generated do not increment counters.
counter-increment-visibility-001
Counter-increment only on 'visibility: hidden' element
An element that is set to 'visibility: hidden' does increment and can create a counter.
counter-increment-visibility-002
Counter-increment on 'visibility: hidden' element
An element that is set to 'visibility: hidden' does increment counters.
counter-increment-visibility-003
Counter-increment on pseudo-element and 'visibility: hidden' on element
An element that is set to 'visibility: hidden' does increment counters when increment is on the pseudo-element.
counter-increment-visibility-004
Counter-increment on pseudo-element, 'visibility: hidden' on element and parent with counter-reset
An element that is set to 'visibility: hidden' does increment counters when increment is on the pseudo-element.
counter-reset-display-001
Counter-reset on 'display: none' element
An element that is set to 'display: none' does not reset counters.
counter-reset-increment-001
Counter-reset before 'counter-increment' before 'counter' use
When both reset and increment are present that the reset occurs first and the increment second.
counter-reset-multiple-001
Multiple 'counter-reset' before 'counter' use
If multiple resets are specified on the same 'counter' then all of them occur in the order specified.
counter-reset-not-generated-001
Counter-reset on pseudo-element that is not generated
Pseudo-elements that are not generated do not reset counters.
counter-reset-visibility-001
Counter-reset on visibility: hidden element
Elements that are set to 'visibility: hidden' reset counters.
increment-counter-001
Counter-increment before 'counter' use
A counter is used after an increment.
multiple-content-values-001
Content with multiple content values
When 'content' property values produce no visual effect or are invalid in the current context the other 'content' property values still apply.
other-attribute-001
Function 'attr()' referencing another elements attribute data
The 'attr()' function can only retrieve data from the same element that is called from.
quotes-negative-001
Quotes with negative depth
When a 'close-quote' makes the depth negative then depth stays at 0. Insertion of a quote does not occur but the remainder of the content string is inserted.
quotes-page-001
Quotes not affected by page level quotes
The page content quotes do not affect the depth of generated quotes.
quotes-repeat-001
Quote depth exceeded
If the depth of the 'quotes' is more than the defined pairs then repeat the last set of pair.
reset-counter-001
Counter-reset before counter use
Counter is used after a reset.