Title: CSS Text Module Level 3
Shortname: css-text
Level: 3
Status: ED
Work Status: Refining
Group: csswg
ED: https://drafts.csswg.org/css-text-3/
TR: https://www.w3.org/TR/css-text-3/
Previous Version: https://www.w3.org/TR/2018/WD-css-text-3-20181206/
Previous Version: https://www.w3.org/TR/2018/WD-css-text-3-20180920/
Previous Version: https://www.w3.org/TR/2017/WD-css-text-3-20170822/
Previous Version: https://www.w3.org/TR/2013/WD-css-text-3-20131010/
Previous Version: https://www.w3.org/TR/2012/WD-css3-text-20121113/
Issue Tracking: Tracker http://www.w3.org/Style/CSS/Tracker/products/10
Test Suite: http://test.csswg.org/suites/css3-text/nightly-unstable/
Editor: Elika J. Etemad / fantasai, Invited Expert, http://fantasai.inkedblade.net/contact, w3cid 35400
Editor: Koji Ishii, Invited Expert, kojiishi@gluesoft.co.jp, w3cid 45369
Editor: Florian Rivoal, Invited Expert, https://florian.rivoal.net, w3cid 43241
Abstract: This CSS module defines properties for text manipulation and specifies their processing model. It covers line breaking, justification and alignment, white space handling, and text transformation.
At Risk: the ''full-width'' value of 'text-transform'
At Risk: the ''full-size-kana'' value of 'text-transform'
At Risk: the <length> values of the 'tab-size' property
At Risk: the 'text-justify' property
At Risk: the percentage values of 'word-spacing'
At Risk: the 'hanging-punctuation' property
At Risk: the ''line-break/anywhere'' value of the 'line-break' property
Ignored Vars: letter-spacing
Status Text: This publication partially addresses the issues in the disposition of comments since the October 2013 Last Call Working Draft, and, while a marked improvement over the previous draft, is not considered to be entirely up-to-date at the time of publication. A completed dispostion of comments and corresponding draft will be published once the issues are fully addressed and reviewed by the CSSWG and Internationalization WG.
WPT Path Prefix: /css/css-text/

Introduction

This module describes the typesetting controls of CSS; that is, the features of CSS that control the translation of source text to formatted, line-wrapped text. Various CSS properties provide control over case transformation, white space collapsing, text wrapping, line breaking rules and hyphenation, alignment and justification, spacing, and indentation.

Note: Font selection is covered in CSS Fonts Level 3 [[CSS-FONTS-3]].

Features for decorating text, such as underlines, emphasis marks, and shadows, (previously part of this module) are covered in CSS Text Decoration Level 3 [[CSS-TEXT-DECOR-3]].

Bidirectional and vertical text are addressed in CSS Writing Modes Level 3 [[CSS-WRITING-MODES-3]].

Further information about the typesetting requirements of various languages and writing systems around the world can be found in the Internationalization Working Group’s Typography Index. [[TYPOGRAPHY]]

Module Interactions

This module, together with [[CSS-TEXT-DECOR-3]], replaces and extends the text-level features defined in [[!CSS2]] chapter 16.

In addition to the terms defined below, other terminology and concepts used in this specification are defined in [[!CSS2]] and [[!CSS-WRITING-MODES-3]]. white-space/text-space-collapse-discard-001.xht white-space/text-space-collapse-preserve-breaks-001.xht white-space/text-space-trim-trim-inner-001.xht

Values

This specification follows the CSS property definition conventions from [[!CSS2]]. Value types not defined in this specification are defined in CSS Values & Units [[!CSS-VALUES-3]]. Other CSS modules may expand the definitions of these value types. In addition to the property-specific values listed in their definitions, all properties defined in this specification also accept the CSS-wide keywords keywords as their property value. For readability they have not been repeated explicitly.

Languages and Typesetting

Authors should language-tag their content accurately for the best typographic behavior.

The content language of an element is the (human) language the element is declared to be in, according to the rules of the document language. For example, the rules for determining the content language of an HTML are defined in [[HTML]], and the rules for determining the content language of an XML element use are defined in [[XML10]]. Note that it is possible for the content language of an element to be unknown-- e.g. untagged content, or content in a document language that does not have a language-tagging facility is considered to have an unknown content language. Note: Authors can tag content using the global lang attribute in HTML, the universal xml:lang attribute in XML, and the HTTP Content-Language header for content served over HTTP. The [=content language=] an element is declared to be in also identifies the specific written form of that language used in that element, known as the content writing system. Note: Depending on the [=document language=]'s facilities for identifying the [=content language=], information about the [=writing system=] may only be carried implicitly. That is typically the case with the [[BCP47]] language tag used in [[HTML]], although it can optionally indicate the [=writing system=] explicitly using a script subtag. Language and writing system conventions can affect line breaking, hyphenation, justification, glyph selection, and many other typographic effects. In CSS, language-specific typographic tailorings are only applied when the content language is known (declared). Therefore, higher quality typography requires authors to communicate to the UA the correct linguistic context of the text in the document. More information about language tags and their interpretation, particularly the use of script tags for atypical language + writing-system combinations, can be found in [[#script-tagging]].

Characters and Letters

The basic unit of typesetting is the character. However, because writing systems are not always as simple as the basic English alphabet, what a character actually is depends on the context in which the term is used. For example, in Hangul (the Korean writing system), each square representation of a syllable (e.g. =Han) can be considered a character. However, the square symbol is really composed of multiple letters each representing a phoneme (e.g. =h, =a, =n) and these also could each be considered a character.

A basic unit of computer text encoding, for any given encoding, is also called a character, and depending on the encoding, a single encoding character might correspond to the entire pre-composed syllabic character (e.g. ), to the individual phonemic character (e.g. ), or to smaller units such as a base letterform (e.g. ) and any combining marks that vary it (e.g. extra strokes that represent aspiration).

In turn, a single encoding character can be represented in the data stream as one or more bytes; and in programming environments one byte is sometimes also called a character.

Therefore the term character is fairly ambiguous where technical precision is required.

For text layout, we will refer to the typographic character unit as the basic unit of text. Even within the realm of text layout, the relevant character unit depends on the operation. For example, line-breaking and letter-spacing will segment a sequence of Thai characters that include U+0E33 THAI CHARACTER SARA AM differently; or the behaviour of a conjunct consonant in a script such as Devanagari may depend on the font in use. So the typographic character represents a unit of the writing system—such as a Latin alphabetic letter (including its diacritics), Hangul syllable, Chinese ideographic character, Myanmar syllable cluster—that is indivisible with respect to a particular typographic operation (line-breaking, first-letter effects, tracking, justification, vertical arrangement, etc.). word-break/word-break-break-all-007.html word-break/word-break-break-all-008.html Unicode Standard Annex #29: Text Segmentation defines a unit called the grapheme cluster which approximates the typographic character. A UA must use the extended grapheme cluster (not legacy grapheme cluster), as defined in [[!UAX29]], as the basis for its typographic character unit. However, the UA should tailor the definitions as required by typographic tradition since the default rules are not always appropriate or ideal-- and is expected to tailor them differently depending on the operation as needed.

Note: The rules for such tailorings are out of scope for CSS.

The following are some examples of typographic character unit tailorings required by standard typesetting practice:

A typographic letter unit or letter for the purpose of this specification is a typographic character unit belonging to one of the Letter or Number general categories in Unicode. [[!UAX44]] See Character Properties for how to determine the Unicode properties of a typographic character unit.

The rendering characteristics of a typographic character unit divided by an element boundary is undefined. Ideally each component should be rendered according to the formatting requirements of its respective element’s properties while maintaining correct shaping and positioning of the typographic character unit as a whole. However, depending on the nature of the formatting differences between its parts and the capabilities of the font technology in use, this is not always possible. Therefore such a typographic character unit may be rendered as belonging to either side of the boundary, or as some approximation of belonging to both. Authors are forewarned that dividing grapheme clusters by element boundaries may give inconsistent or undesired results.

Text Processing

CSS is built on [[UNICODE]]. UAs that support Unicode must adhere to all normative requirements of the Unicode Core Standard, except where explicitly overridden by CSS. UAs that use a different encoding are not explicitly supported by the CSS specifications; they are, however, expected to fulfill the same text handling requirements by assuming an appropriate mapping between that encoding and Unicode.

Transforming Text

Case Transforms: the 'text-transform' property

    Name: text-transform
    Value: none | [capitalize | uppercase | lowercase ] || full-width || full-size-kana
    Initial: none
    Applies to: inline boxes
    Inherited: yes
    Canonical order: n/a
    Computed value: specified keyword
    Animation type: discrete
    
inheritance.html

This property transforms text for styling purposes. It has no effect on the underlying content, and must not affect the content of a plain text copy & paste operation. text-transform/text-transform-copy-paste-001-manual.html

Values have the following meanings:

none
No effects. text-transform/text-transform-none-001.xht
capitalize
Puts the first typographic letter unit of each word, if lowercase, in titlecase; other characters are unaffected. text-transform/text-transform-capitalize-001.html text-transform/text-transform-capitalize-003.html text-transform/text-transform-capitalize-005.html text-transform/text-transform-capitalize-007.html text-transform/text-transform-capitalize-009.html text-transform/text-transform-capitalize-010.html text-transform/text-transform-capitalize-011.html text-transform/text-transform-capitalize-014.html text-transform/text-transform-capitalize-016.html text-transform/text-transform-capitalize-018.html text-transform/text-transform-capitalize-020.html text-transform/text-transform-capitalize-022.html text-transform/text-transform-capitalize-024.html text-transform/text-transform-capitalize-026.html text-transform/text-transform-capitalize-028.html text-transform/text-transform-capitalize-030.html text-transform/text-transform-capitalize-031.html text-transform/text-transform-capitalize-032.xht
uppercase
Puts all letters in uppercase. text-transform/text-transform-uppercase-001.xht text-transform/text-transform-upperlower-001.html text-transform/text-transform-upperlower-003.html text-transform/text-transform-upperlower-005.html text-transform/text-transform-upperlower-007.html text-transform/text-transform-upperlower-009.html text-transform/text-transform-upperlower-011.html text-transform/text-transform-upperlower-015.html text-transform/text-transform-upperlower-017.html text-transform/text-transform-upperlower-019.html text-transform/text-transform-upperlower-021.html text-transform/text-transform-upperlower-023.html text-transform/text-transform-upperlower-025.html text-transform/text-transform-upperlower-027.html text-transform/text-transform-upperlower-029.html text-transform/text-transform-upperlower-031.html text-transform/text-transform-upperlower-101.html text-transform/text-transform-upperlower-103.html
lowercase
Puts all letters in lowercase. text-transform/text-transform-lowercase-001.xht text-transform/text-transform-lowercase-002.xht text-transform/text-transform-upperlower-002.html text-transform/text-transform-upperlower-004.html text-transform/text-transform-upperlower-006.html text-transform/text-transform-upperlower-008.html text-transform/text-transform-upperlower-010.html text-transform/text-transform-upperlower-012.html text-transform/text-transform-upperlower-014.html text-transform/text-transform-upperlower-016.html text-transform/text-transform-upperlower-018.html text-transform/text-transform-upperlower-020.html text-transform/text-transform-upperlower-022.html text-transform/text-transform-upperlower-024.html text-transform/text-transform-upperlower-026.html text-transform/text-transform-upperlower-028.html text-transform/text-transform-upperlower-030.html text-transform/text-transform-upperlower-102.html text-transform/text-transform-upperlower-104.html
full-width
Puts all typographic character units in fullwidth form. If a character does not have a corresponding fullwidth form, it is left as is. This value is typically used to typeset Latin letters and digits as if they were ideographic characters. text-transform/text-transform-fullwidth-001.xht text-transform/text-transform-fullwidth-002.xht text-transform/text-transform-fullwidth-004.xht text-transform/text-transform-fullwidth-005.xht
full-size-kana
Converts all [=small Kana=] characters to the equivalent [=full-size Kana=]. This value is typically used for ruby annotation text, where authors may want all small Kana to be drawn as large Kana to compensate for legibility issues at the small font sizes typically used in ruby. text-transform/text-transform-full-size-kana-001.html text-transform/text-transform-full-size-kana-002.html text-transform/text-transform-full-size-kana-003.html text-transform/text-transform-full-size-kana-004.html text-transform/text-transform-full-size-kana-005.html text-transform/text-transform-full-size-kana-006.html text-transform/text-transform-full-size-kana-007.html

For ''capitalize'', what constitutes a “word“ is UA-dependent; [[!UAX29]] is suggested (but not required) for determining such word boundaries. Authors should not expect ''capitalize'' to follow language-specific titlecasing conventions (such as skipping articles in English). Out-of-flow elements and inline element boundaries must not introduce a 'text-transform' word boundary and must be ignored when determining such word boundaries. text-transform/text-transform-capitalize-033.html

The following example converts the ASCII characters used in abbreviations in Japanese text to their fullwidth variants so that they lay out and line break like ideographs:

abbr:lang(ja) { text-transform: full-width; }

Note: As defined in Text Processing Order of Operations, transforming text affects line-breaking and other formatting operations.

The UA must use the full case mappings for Unicode characters, including any conditional casing rules, as defined in Default Case Algorithm section of The Unicode Standard [[!UNICODE]]. If (and only if) the content language of the element is, according to the rules of the document language, known, then any appropriate language-specific rules must be applied as well. These minimally include, but are not limited to, the language-specific rules in Unicode's SpecialCasing.txt. writing-system/writing-system-text-transform-001.html text-transform/text-transform-tailoring-001.html text-transform/text-transform-tailoring-002.html text-transform/text-transform-tailoring-002a.html text-transform/text-transform-tailoring-003.html text-transform/text-transform-tailoring-004.html text-transform/text-transform-tailoring-005.html text-transform/text-transform-upperlower-032.html text-transform/text-transform-upperlower-033.html text-transform/text-transform-upperlower-034.html text-transform/text-transform-upperlower-035.html text-transform/text-transform-upperlower-038.html text-transform/text-transform-upperlower-039.html text-transform/text-transform-upperlower-040.html text-transform/text-transform-upperlower-041.html text-transform/text-transform-upperlower-042.html text-transform/text-transform-upperlower-043.html

For example, in Turkish there are two “i”s, one with a dot—“İ” and “i”— and one without—“I” and “ı”. Thus the usual case mappings between “I” and “i” are replaced with a different set of mappings to their respective undotted/dotted counterparts, which do not exist in English. This mapping must only take effect if the content language is Turkish written in its modern Latin-based writing system (or another Turkic language that uses Turkish casing rules); in other languages, the usual mapping of “I” and “i” is required. This rule is thus conditionally defined in Unicode's SpecialCasing.txt file.

The definition of fullwidth and halfwidth forms can be found on the Unicode consortium web site at [[!UAX11]]. The mapping to fullwidth form is defined by taking code points with the <wide> or the <narrow> tag in their Decomposition_Mapping in [[!UAX44]]. For the <narrow> tag, the mapping is from the code point to the decomposition (minus <narrow> tag), and for the <wide> tag, the mapping is from the decomposition (minus the <wide> tag) back to the original code point. text-transform/text-transform-fullwidth-001.xht text-transform/text-transform-fullwidth-002.xht text-transform/text-transform-fullwidth-004.xht text-transform/text-transform-fullwidth-005.xht

The mappings for small Kana to full-size Kana are defined in [[#small-kana]].

When multiple values are specified and therefore multiple transformations need to be applied, they are applied in the following order:

  1. ''capitalize'', ''upercase'', and ''lowercase''
  2. ''full-width''
  3. ''full-size-kana''

Text transformation happens after white space processing, which means that ''full-width'' only transforms U+0020 spaces to U+3000 within preserved white space.

Note: A future level of CSS may introduce the ability to create custom mapping tables for less common text transforms, such as by an ''@text-transform'' rule similar to ''@counter-style'' from [[CSS-COUNTER-STYLES-3]].

White Space and Wrapping: the 'white-space' property

  Name: white-space
  Value: normal | pre | nowrap | pre-wrap | break-spaces | pre-line
  Initial: normal
  Applies to: inline boxes
  Inherited: yes
  Canonical order: n/a
  Computed value: specified keyword
  Animation type: discrete
  
inheritance.html c562-white-sp-000.xht white-space-006.xht white-space-007.xht white-space-applies-to-001.xht white-space-mixed-001.xht white-space-mixed-002.xht white-space-mixed-003.xht

This property specifies two things:

Values have the following meanings, which must be interpreted according to the White Space Processing and Line Breaking rules:

normal
This value directs user agents to collapse sequences of white space into a single character (or in some cases, no character). Lines may wrap at allowed soft wrap opportunities, as determined by the line-breaking rules in effect, in order to minimize inline-axis overflow. white-space-normal-001.xht white-space-normal-002.xht white-space-normal-003.xht white-space-normal-004.xht white-space-normal-005.xht white-space-normal-006.xht white-space-normal-007.xht white-space-normal-008.xht white-space-normal-009.xht
pre
This value prevents user agents from collapsing sequences of white space. Segment breaks such as line feeds are preserved as forced line breaks. Lines only break at forced line breaks; content that does not fit within the block container overflows it. white-space-pre-001.xht white-space-pre-002.xht white-space-pre-005.xht white-space-pre-006.xht
nowrap
Like ''white-space/normal'', this value collapses white space; but like ''pre'', it does not allow wrapping. white-space-nowrap-001.xht white-space-nowrap-005.xht white-space-nowrap-006.xht
pre-wrap
Like ''pre'', this value preserves white space; but like ''white-space/normal'', it allows wrapping. white-space/pre-wrap-001.html white-space/pre-wrap-002.html white-space/pre-wrap-003.html white-space/pre-wrap-004.html white-space/pre-wrap-005.html white-space/pre-wrap-006.html white-space/pre-wrap-007.html white-space/pre-wrap-011.html white-space/pre-wrap-012.html white-space/pre-wrap-013.html white-space/pre-wrap-014.html white-space/textarea-pre-wrap-001.html white-space/textarea-pre-wrap-002.html white-space/textarea-pre-wrap-003.html white-space/textarea-pre-wrap-004.html white-space/textarea-pre-wrap-005.html white-space/textarea-pre-wrap-006.html white-space/textarea-pre-wrap-007.html white-space/textarea-pre-wrap-011.html white-space/textarea-pre-wrap-012.html white-space/textarea-pre-wrap-013.html white-space/textarea-pre-wrap-014.html white-space/white-space-pre-wrap-trailing-spaces-001.html white-space/white-space-pre-wrap-trailing-spaces-002.html white-space/white-space-pre-wrap-trailing-spaces-003.html
break-spaces
The behavior is identical to that of ''white-space/pre-wrap'', except that: * Any sequence of preserved white space always takes up space, including at the end of the line. * A line breaking opportunity exists after every preserved white space character, including between white space characters. overflow-wrap/overflow-wrap-break-word-002.html overflow-wrap/overflow-wrap-anywhere-002.html white-space/break-spaces-001.html white-space/break-spaces-002.html white-space/textarea-break-spaces-001.html white-space/textarea-break-spaces-002.html white-space/tab-stop-threshold-005.html white-space/tab-stop-threshold-006.html Such preserved spaces take up space and do not hang, and thus affect the box's intrinsic sizes ([=min-content size=] and [=max-content size=]). white-space/white-space-intrinsic-size-001.html white-space/white-space-intrinsic-size-002.html

Note: This value does not guarantee that there will never be any overflow due to spaces: for example, if the line length is so short that even a single space does not fit, overflow is unavoidable.

pre-line
Like ''white-space/normal'', this value collapses consecutive spaces and allows wrapping, but preserves segment breaks in the source as forced line breaks. white-space-005.xht white-space-generated-content-before-001.xht white-space-processing-004.xht white-space-processing-010.xht white-space-processing-017.xht white-space-processing-021.xht white-space-processing-024.xht white-space-processing-027.xht white-space-processing-028.xht white-space-processing-029.xht white-space-processing-030.xht white-space-processing-035.xht white-space-processing-036.xht white-space-processing-045.xht white-space-processing-053.xht

White space that was not removed or collapsed due to white space processing is called preserved white space. In general, preserved white space is measured when calculating the intrinsic sizes of text; however preserved white space that would be allowed to hang at the end of the line (i.e. that preserved by ''pre-wrap'') is excluded-- that is, considered to hang-- when calculating min-content sizes and any sizes derived thereof.

The following informative table summarizes the behavior of various 'white-space' values:

New Lines Spaces and Tabs Text Wrapping End-of-line spaces
''white-space/normal'' Collapse Collapse Wrap Remove
''pre'' Preserve Preserve No wrap Preserve
''nowrap'' Collapse Collapse No wrap Remove
''pre-wrap'' Preserve Preserve Wrap Hang
''break-spaces'' Preserve Preserve Wrap Wrap
''pre-line'' Preserve Collapse Wrap Remove

See White Space Processing Rules for details on how white space collapses. An informative summary of collapsing (''white-space/normal'' and ''nowrap'') is presented below:

See Line Breaking for details on wrapping behavior.

White Space Processing Details

The source text of a document often contains formatting that is not relevant to the final rendering: for example, breaking the source into segments (lines) for ease of editing or adding white space characters such as tabs and spaces to indent the source code. CSS white space processing allows the author to control interpretation of such formatting: to preserve or collapse it away when rendering the document. White space processing in CSS interprets white space characters only for rendering: it has no effect on the underlying document data.

White space processing in CSS is controlled with the 'white-space' property.

CSS does not define document segmentation rules. Segments can be separated by a particular newline sequence (such as a line feed or CRLF pair), or delimited by some other mechanism, such as the SGML RECORD-START and RECORD-END tokens. For CSS processing, each document language–defined segment break and each line feed (U+000A) in the text is treated as a segment break, which is then interpreted for rendering as specified by the 'white-space' property.

Note: A document parser might not only normalize any segment breaks, but also collapse other space characters or otherwise process white space according to markup rules. Because CSS processing occurs after the parsing stage, it is not possible to restore these characters for styling. Therefore, some of the behavior specified below can be affected by these limitations and may be user agent dependent.

Note: Anonymous blocks consisting entirely of collapsible white space are removed from the rendering tree. Thus any such white space surrounding a block-level element is collapsed away. See [[CSS2]] section 9.2.2.1

Control characters (Unicode category Cc)-- other than tabs (U+0009), line feeds (U+000A), and sequences that form a segment break-- must be rendered as a visible glyph which the UA must synthethize if the glyphs found in the font are not visible, and must be otherwise treated as any other character of the Other Symbols (So) general category and Common script. The UA may use a glyph provided by a font specifically for the control character, substitute the glyphs provided for the corresponding symbol in the Control Pictures block, generate a visual representation of its code point value, or use some other method to provide an appropriate visible glyph. As required by [[!UNICODE]], unsupported Default_ignorable characters must be ignored for rendering. white-space/control-chars-000.html white-space/control-chars-001.html white-space/control-chars-002.html white-space/control-chars-003.html white-space/control-chars-004.html white-space/control-chars-005.html white-space/control-chars-006.html white-space/control-chars-007.html white-space/control-chars-008.html white-space/control-chars-00B.html white-space/control-chars-00D.html white-space/control-chars-00E.html white-space/control-chars-00F.html white-space/control-chars-010.html white-space/control-chars-011.html white-space/control-chars-012.html white-space/control-chars-013.html white-space/control-chars-014.html white-space/control-chars-015.html white-space/control-chars-016.html white-space/control-chars-017.html white-space/control-chars-018.html white-space/control-chars-019.html white-space/control-chars-01A.html white-space/control-chars-01B.html white-space/control-chars-01C.html white-space/control-chars-01D.html white-space/control-chars-01E.html white-space/control-chars-01F.html white-space/control-chars-07F.html white-space/control-chars-080.html white-space/control-chars-081.html white-space/control-chars-082.html white-space/control-chars-083.html white-space/control-chars-084.html white-space/control-chars-085.html white-space/control-chars-086.html white-space/control-chars-087.html white-space/control-chars-088.html white-space/control-chars-089.html white-space/control-chars-08A.html white-space/control-chars-08B.html white-space/control-chars-08C.html white-space/control-chars-08D.html white-space/control-chars-08E.html white-space/control-chars-08F.html white-space/control-chars-090.html white-space/control-chars-091.html white-space/control-chars-092.html white-space/control-chars-093.html white-space/control-chars-094.html white-space/control-chars-095.html white-space/control-chars-096.html white-space/control-chars-097.html white-space/control-chars-098.html white-space/control-chars-099.html white-space/control-chars-09A.html white-space/control-chars-09B.html white-space/control-chars-09C.html white-space/control-chars-09D.html white-space/control-chars-09E.html white-space/control-chars-09F.html

The White Space Processing Rules

White space processing in CSS affects only the document white space characters: spaces (U+0020), tabs (U+0009), and segment breaks. white-space-normal-003.xht white-space-normal-004.xht white-space-normal-005.xht white-space-normal-006.xht white-space-normal-007.xht white-space-normal-008.xht white-space-nowrap-005.xht white-space-nowrap-006.xht white-space-pre-005.xht white-space-pre-006.xht white-space-processing-054.xht white-space-processing-055.xht white-space-processing-056.xht

Note: The set of characters considered document white space (part of the document content) and that considered syntactic white space (part of the CSS syntax) are not necessarily identical. However, since both include spaces (U+0020), tabs (U+0009), and line feeds (U+000A) most authors won't notice any differences.

Phase I: Collapsing and Transformation

For each inline (including anonymous inlines; see [[CSS2]] section 9.2.2.1) within an inline formatting context, white space characters are handled as follows, ignoring bidi formatting characters (characters with the Bidi_Control property [[!UAX9]]) as if they were not there: white-space/white-space-collapse-002.html