8000 csswg-drafts/css-text/Overview.html at b994681d89165a061a0b193aa11192644e3a8d40 · w3c/csswg-drafts · GitHub
Skip to content

Latest commit

 

History

History
2975 lines (2957 loc) · 215 KB

File metadata and controls

2975 lines (2957 loc) · 215 KB
<!doctype html><html lang="en">
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
<title>CSS Text Module Level 3</title>
<meta content="refining" name="csswg-work-status">
<meta content="ED" name="w3c-status">
<link href="../default.css" rel="stylesheet" type="text/css">
<link href="../csslogo.ico" rel="shortcut icon" type="image/x-icon">
<style>
body {
background: url("https://www.w3.org/StyleSheets/TR/logo-ED") top left no-repeat white;
background-attachment: fixed;
color: black;
font-family: sans-serif;
margin: 0 auto;
max-width: 50em;
padding: 2em 1em 2em 70px;
}
:link { color: #00C; background: transparent }
:visited { color: #609; background: transparent }
a[href]:active { color: #C00; background: transparent }
a[href]:hover { background: #ffa }
a[href] img { border-style: none }
h1, h2, h3, h4, h5, h6 { text-align: left }
h1, h2, h3 { color: #005A9C; }
h1 { font: 170% sans-serif }
h2 { font: 140% sans-serif }
h3 { font: 120% sans-serif }
h4 { font: bold 100% sans-serif }
h5 { font: italic 100% sans-serif }
h6 { font: small-caps 100% sans-serif }
.hide { display: none }
div.head { margin-bottom: 1em }
div.head h1 { margin-top: 2em; clear: both }
div.head table { margin-left: 2em; margin-top: 2em }
p.copyright { font-size: small }
p.copyright small { font-size: small }
pre { margin-left: 2em }
dt { font-weight: bold }
ul.toc, ol.toc {
list-style: none;
}
</style>
<meta content="Bikeshed 1.0.0" name="generator">
<script defer="" src="//test.csswg.org/harness/annotate.js#css-text-3_dev/css-text-3" type="text/javascript"></script>
<style type="text/css">
img { vertical-align: middle; }
span[lang] { font-size: 125%; line-height: 1; vertical-align: middle;}
/* Bidi &amp; spaces example */
.egbidiwsaA,.egbidiwsbB,.egbidiwsaB,.egbidiwsbC
{ white-space:pre;font-size:80%;font-family:monospace; vertical-align:2px; margin:1px }
.egbidiwsaA { background:lime;padding:2px; }
.egbidiwsbB { border:2px solid blue }
.egbidiwsaB { background:yellow;border:2px dotted white }
.egbidiwsbC { border:2px dotted red }
.hyphens-ex {
border: thin solid black;
display: inline-block;
padding: 4pt;
}
/* Start Letter-spacing Tutorial */
.ls-ex {
font-size: 200%;
margin-left: 1em;
margin-right: 1em;
}
.ls-fixed-width {
width: 10em;
}
.color-box { background: rgb(224, 203, 82); }
.bad { color: red; }
.good { color: green; }
/* End Letter-spacing Tutorial */
.char { border: 1px dotted gray; }
.quarter { font-size: 25%; }
tt[lang="ja"] { font-family: "MS Gothic", "Osaka", monospace }
div.figure table {
margin :auto;
}
.feedback {
background: #FFEECC;
border-color: orange;
}
.feedback:before {
content: "Info Needed";
color: #FF8800;
}
</style>
</head>
<body class="h-entry">
<div class="head">
<p data-fill-with="logo"><a class="logo" href="http://www.w3.org/"> <img alt="W3C" height="48" src="https://www.w3.org/Icons/w3c_home" width="72"> </a> </p>
<h1 class="p-name no-ref" id="title">CSS Text Module Level 3</h1>
<h2 class="no-num no-toc no-ref heading settled" id="subtitle"><span class="content">Editor’s Draft, <time class="dt-updated" datetime="2015-09-08">8 September 2015</time></span></h2>
<div data-fill-with="spec-metadata">
<dl>
<dt>This version:
<dd><a class="u-url" href="http://dev.w3.org/csswg/css-text-3/">http://dev.w3.org/csswg/css-text-3/</a>
<dt>Latest version:
<dd><a href="http://www.w3.org/TR/css-text-3/">http://www.w3.org/TR/css-text-3/</a>
<dt>Previous Versions:
<dd><a href="http://www.w3.org/TR/2012/WD-css3-text-20121113/" rel="previous">http://www.w3.org/TR/2012/WD-css3-text-20121113/</a>
<dt>Feedback:
<dd><span><a href="mailto:www-style@w3.org?subject=%5Bcss-text%5D%20YOUR%20TOPIC%20HERE">www-style@w3.org</a> with subject line “<kbd>[css-text] <var>… message topic …</var></kbd>” (<a href="http://lists.w3.org/Archives/Public/www-style/" rel="discussion">archives</a>)</span>
<dt>Test Suite:
<dd><a href="http://test.csswg.org/suites/css3-text/nightly-unstable/">http://test.csswg.org/suites/css3-text/nightly-unstable/</a>
<dt>Issue Tracking:
<dd><a href="https://github.com/w3c/csswg-drafts/issues/">GitHub</a>
<dd><a href="#issues-index">Inline In Spec</a>
<dd><span><a href="http://www.w3.org/Style/CSS/Tracker/products/10">http://www.w3.org/Style/CSS/Tracker/products/10</a></span>
<dt class="editor">Editors:
<dd class="editor p-author h-card vcard"><a class="p-name fn u-url url" href="http://fantasai.inkedblade.net/contact">Elika J. Etemad / fantasai</a> (<span class="p-org org">Invited Expert</span>)
<dd class="editor p-author h-card vcard"><a class="p-name fn u-email email" href="mailto:kojiishi@gluesoft.co.jp">Koji Ishii</a> (<span class="p-org org">Invited Expert</span>)
</dl>
</div>
<div data-fill-with="warning"></div>
<p class="copyright" data-fill-with="copyright"><a href="http://www.w3.org/Consortium/Legal/ipr-notice#Copyright">Copyright</a> © 2015 <a href="http://www.w3.org/"><abbr title="World Wide Web Consortium">W3C</abbr></a><sup>®</sup> (<a href="http://www.csail.mit.edu/"><abbr title="Massachusetts Institute of Technology">MIT</abbr></a>, <a href="http://www.ercim.eu/"><abbr title="European Research Consortium for Informatics and Mathematics">ERCIM</abbr></a>, <a href="http://www.keio.ac.jp/">Keio</a>, <a href="http://ev.buaa.edu.cn/">Beihang</a>). W3C <a href="http://www.w3.org/Consortium/Legal/ipr-notice#Legal_Disclaimer">liability</a>, <a href="http://www.w3.org/Consortium/Legal/ipr-notice#W3C_Trademarks">trademark</a> and <a href="http://www.w3.org/Consortium/Legal/copyright-documents">document use</a> rules apply. </p>
<hr title="Separator for header">
</div>
<h2 class="no-num no-toc no-ref heading settled" id="abstract"><span class="content">Abstract</span></h2>
<div class="p-summary" data-fill-with="abstract">
<p>This CSS3 module defines properties for text manipulation and specifies their processing model. It covers line breaking, justification and alignment, white space handling, and text transformation.</p>
<a href="http://www.w3.org/TR/CSS/">CSS</a> is a language for describing the rendering of structured documents
(such as HTML and XML)
on screen, on paper, in speech, etc.
</div>
<h2 class="no-num no-toc no-ref heading settled" id="status"><span class="content">Status of this document</span></h2>
<div data-fill-with="status">
<p> This is a public copy of the editors’ draft.
It is provided for discussion only and may change at any moment.
Its publication here does not imply endorsement of its contents by W3C.
Don’t cite this document other than as work in progress. </p>
<p> The (<a href="http://lists.w3.org/Archives/Public/www-style/">archived</a>) public mailing list <a href="mailto:www-style@w3.org?Subject=%5Bcss-text%5D%20PUT%20SUBJECT%20HERE">www-style@w3.org</a> (see <a href="http://www.w3.org/Mail/Request">instructions</a>)
is preferred for discussion of this specification.
When sending e-mail,
please put the text “css-text” in the subject,
preferably like this:
“[css-text] <em>…summary of comment…</em>” </p>
<p> This document was produced by the <a href="http://www.w3.org/Style/CSS/members">CSS Working Group</a> (part of the <a href="http://www.w3.org/Style/">Style Activity</a>). </p>
<p> This document was produced by a group operating under
the <a href="http://www.w3.org/Consortium/Patent-Policy-20040205/">5 February 2004 W3C Patent Policy</a>.
W3C maintains a <a href="http://www.w3.org/2004/01/pp-impl/32061/status" rel="disclosure">public list of any patent disclosures</a> made in connection with the deliverables of the group;
that page also includes instructions for disclosing a patent.
An individual who has actual knowledge of a patent which the individual believes contains <a href="http://www.w3.org/Consortium/Patent-Policy-20040205/#def-essential">Essential Claim(s)</a> must disclose the information in accordance with <a href="http://www.w3.org/Consortium/Patent-Policy-20040205/#sec-Disclosure">section 6 of the W3C Patent Policy</a>. </p>
<p> This document is governed by the <a href="http://www.w3.org/2014/Process-20140801/" id="w3c_process_revision">1 August 2014 W3C Process Document</a>. </p>
<p></p>
</div>
<div data-fill-with="at-risk">
<p>The following features are at-risk, and may be dropped during the CR period: </p>
<ul>
<li>the <a class="css" data-link-type="maybe" href="#valdef-text-transform-full-width">full-width</a> value of <a class="property" data-link-type="propdesc" href="#propdef-text-transform">text-transform</a>
<li>the &lt;length> values of the <a class="property" data-link-type="propdesc" href="#propdef-tab-size">tab-size</a> property
<li>the <a class="property" data-link-type="propdesc" href="#propdef-text-justify">text-justify</a> property
<li>the percentage values of <a class="property" data-link-type="propdesc" href="#propdef-word-spacing">word-spacing</a>
<li>the <a class="property" data-link-type="propdesc" href="#propdef-hanging-punctuation">hanging-punctuation</a> property
<li>the <a class="css" data-link-type="maybe" href="#valdef-white-space-pre-wrap-auto">pre-wrap-auto</a> value of the <a class="property" data-link-type="propdesc" href="#propdef-white-space">white-space</a> property
</ul>
<p>“At-risk” is a W3C Process term-of-art, and does not necessarily imply that the feature is in danger of being dropped or delayed. It means that the WG believes the feature may have difficulting being interoperably implemented in a timely manner, and marking it as such allows the WG to drop the feature if necessary when transitioning to the Proposed Rec stage, without having to publish a new Candidate Rec without the feature first.</p>
</div>
<h2 class="no-num no-toc no-ref heading settled" id="contents"><span class="content">Table of Contents</span></h2>
<div data-fill-with="table-of-contents" role="navigation">
<ul class="toc" role="directory">
<li>
<a href="#intro"><span class="secno">1</span> <span class="content"> Introduction</span></a>
<ul class="toc">
<li><a href="#placement"><span class="secno">1.1</span> <span class="content"> Module Interactions</span></a>
<li><a href="#values"><span class="secno">1.2</span> <span class="content"> Values</span></a>
<li>
<a href="#terms"><span class="secno">1.3</span> <span class="content"> Terminology</span></a>
<ul class="toc">
<li><a href="#characters"><span class="secno">1.3.1</span> <span class="content"> Characters and Letters</span></a>
<li><a href="#languages"><span class="secno">1.3.2</span> <span class="content"> Languages and Typesetting</span></a>
</ul>
</ul>
<li>
<a href="#transforming"><span class="secno">2</span> <span class="content"> Transforming Text</span></a>
<ul class="toc">
<li><a href="#text-transform-property"><span class="secno">2.1</span> <span class="content"> <span></span> <span></span> Case Transforms: the <span class="property">text-transform</span> property</span></a>
</ul>
<li><a href="#white-space-property"><span class="secno">3</span> <span class="content"> <span></span><span></span> White Space and Wrapping: the <span class="property">white-space</span> property</span></a>
<li>
<a href="#white-space-processing"><span class="secno">4</span> <span class="content"> White Space Processing Details</span></a>
<ul class="toc">
<li>
<a href="#white-space-rules"><span class="secno">4.1</span> <span class="content"> The White Space Processing Rules</span></a>
<ul class="toc">
<li><a href="#white-space-phase-1"><span class="secno">4.1.1</span> <span class="content">Phase I: Collapsing and Transformation</span></a>
<li><a href="#line-break-transform"><span class="secno">4.1.2</span> <span class="content"> Segment Break Transformation Rules</span></a>
<li><a href="#white-space-phase-2"><span class="secno">4.1.3</span> <span class="content">Phase II: Trimming and Positioning</span></a>
</ul>
<li><a href="#tab-size-property"><span class="secno">4.2</span> <span class="content"> Tab Character Size: the <span class="property">tab-size</span> property</span></a>
</ul>
<li>
<a href="#line-breaking"><span class="secno">5</span> <span class="content"> Line Breaking and Word Boundaries</span></a>
<ul class="toc">
<li><a href="#line-break-details"><span class="secno">5.1</span> <span class="content"> Line Breaking Details</span></a>
<li><a href="#word-break-property"><span class="secno">5.2</span> <span class="content"> Breaking Rules for Letters: the <span class="property">word-break</span> property</span></a>
<li><a href="#line-break-property"><span class="secno">5.3</span> <span class="content"> Breaking Rules for Punctuation: the <span class="property">line-break</span> property</span></a>
</ul>
<li>
<a href="#hyphenation"><span class="secno">6</span> <span class="content">Breaking Within Words</span></a>
<ul class="toc">
<li><a href="#hyphens-property"><span class="secno">6.1</span> <span class="content">Hyphenation Control: the <span class="property">hyphens</span> property</span></a>
<li><a href="#overflow-wrap-property"><span class="secno">6.2</span> <span class="content"> Overflow Wrapping: the <span class="property">overflow-wrap</span>/<span class="property">word-wrap</span> property</span></a>
</ul>
<li>
<a href="#justification"><span class="secno">7</span> <span class="content"> Alignment and Justification</span></a>
<ul class="toc">
<li><a href="#text-align-property"><span class="secno">7.1</span> <span class="content"> Text Alignment: the <span class="property">text-align</span> shorthand</span></a>
<li><a href="#text-align-all-property"><span class="secno">7.2</span> <span class="content"> Default Text Alignment: the <span class="property">text-align-all</span> property</span></a>
<li><a href="#text-align-last-property"><span class="secno">7.3</span> <span class="content"> Last Line Alignment: the <span class="property">text-align-last</span> property</span></a>
<li>
<a href="#text-justify-property"><span class="secno">7.4</span> <span class="content"> Justification Method: the <span class="property">text-justify</span> property</span></a>
<ul class="toc">
<li><a href="#expanding-text"><span class="secno">7.4.1</span> <span class="content"> Expanding and Compressing Text</span></a>
<li><a href="#justify-symbols"><span class="secno">7.4.2</span> <span class="content"> Handling Symbols and Punctuation</span></a>
<li><a href="#justify-limits"><span class="secno">7.4.3</span> <span class="content"> Unexpandable Text</span></a>
<li><a href="#justify-cursive"><span class="secno">7.4.4</span> <span class="content"> Cursive Scripts</span></a>
<li><a href="#justify-algos"><span class="secno">7.4.5</span> <span class="content"> Possible Algorithms</span></a>
</ul>
</ul>
<li>
<a href="#spacing"><span class="secno">8</span> <span class="content"> Spacing</span></a>
<ul class="toc">
<li><a href="#word-spacing-property"><span class="secno">8.1</span> <span class="content"> Word Spacing: the <span class="property">word-spacing</span> property</span></a>
<li><a href="#letter-spacing-property"><span class="secno">8.2</span> <span class="content"> Tracking: the <span class="property">letter-spacing</span> property</span></a>
</ul>
<li>
<a href="#edge-effects"><span class="secno">9</span> <span class="content"> Edge Effects</span></a>
<ul class="toc">
<li><a href="#text-indent-property"><span class="secno">9.1</span> <span class="content"> First Line Indentation: the <span class="property">text-indent</span> property</span></a>
<li><a href="#hanging-punctuation-property"><span class="secno">9.2</span> <span class="content"> Hanging Punctuation: the <span class="property">hanging-punctuation</span> property</span></a>
<li><a href="#bidi-linebox"><span class="secno">9.3</span> <span class="content"> Bidirectionality and Line Boxes</span></a>
</ul>
<li><a href="#order"><span class="secno"></span> <span class="content">Appendix A:
Text Processing Order of Operations</span></a>
<li><a href="#default-stylesheet"><span class="secno"></span> <span class="content"> Appendix B: Default UA Stylesheet</span></a>
<li><a href="#script-groups"><span class="secno"></span> <span class="content"> Appendix C: Scripts and Spacing</span></a>
<li><a href="#character-properties"><span class="secno"></span> <span class="content">Appendix D.
Characters and Properties</span></a>
<li><a href="#acknowledgements"><span class="secno"></span> <span class="content"> Acknowledgements</span></a>
<li>
<a href="#changes"><span class="secno"></span> <span class="content"> Changes</span></a>
<ul class="toc">
<li><a href="#recent-changes"><span class="secno"></span> <span class="content"> Changes from the <span>October
2013 CSS3 Text <abbr title="Last Call Working Draft">LCWD</abbr></span></span></a>
<li><a href="#changes-2013"><span class="secno"></span> <span class="content"> Changes from the <span>November
2012 CSS3 Text <abbr title="Working Draft">WD</abbr></span></span></a>
</ul>
<li>
<a href="#conformance"><span class="secno"></span> <span class="content"> Conformance</span></a>
<ul class="toc">
<li><a href="#conventions"><span class="secno"></span> <span class="content"> Document conventions</span></a>
<li><a href="#conformance-classes"><span class="secno"></span> <span class="content"> Conformance classes</span></a>
<li><a href="#partial"><span class="secno"></span> <span class="content"> Partial implementations</span></a>
<li><a href="#experimental"><span class="secno"></span> <span class="content"> Experimental implementations</span></a>
<li><a href="#testing"><span class="secno"></span> <span class="content"> Non-experimental implementations</span></a>
</ul>
<li>
<a href="#index"><span class="secno"></span> <span class="content">Index</span></a>
<ul class="toc">
<li><a href="#index-defined-here"><span class="secno"></span> <span class="content">Terms defined by this specification</span></a>
<li><a href="#index-defined-elsewhere"><span class="secno"></span> <span class="content">Terms defined by reference</span></a>
</ul>
<li>
<a href="#references"><span class="secno"></span> <span class="content">References</span></a>
<ul class="toc">
<li><a href="#normative"><span class="secno"></span> <span class="content">Normative References</span></a>
<li><a href="#informative"><span class="secno"></span> <span class="content">Informative References</span></a>
</ul>
<li><a href="#property-index"><span class="secno"></span> <span class="content">Property Index</span></a>
<li><a href="#issues-index"><span class="secno"></span> <span class="content">Issues Index</span></a>
</ul>
</div>
<main>
<h2 class="heading settled" data-level="1" id="intro"><span class="secno">1. </span><span class="content"> Introduction</span><a class="self-link" href="#intro"></a></h2>
<p>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 <a href="#transforming">case transformation</a>, <a href="#white-space">white space collapsing</a>, <a href="#white-space">text wrapping</a>, <a href="#line-breaking">line breaking rules</a> and <a href="#hyphenation">hyphenation</a>, <a href="#justification">alignment and justification</a>, <a href="#spacing">spacing</a>,
and <a href="#edge-effects">indentation</a>. </p>
<div class="note" role="note">
<p>Font selection is covered in <a href="http://www.w3.org/TR/css3-fonts/">CSS Fonts Level 3</a> <a data-link-type="biblio" href="#biblio-css3-fonts">[CSS3-FONTS]</a>. </p>
<p> <span id="decoration"></span> <span id="text-decoration"></span> <span id="line-decoration"></span> <span id="text-decoration-line"></span> <span id="text-decoration-color"></span> <span id="text-decoration-style"></span> <span id="text-decoration-skip"></span> <span id="text-underline-position"></span> <span id="emphasis-marks"></span> <span id="text-emphasis-style"></span> <span id="text-emphasis-color"></span> <span id="text-emphasis"></span> <span id="text-emphasis-position"></span> <span id="text-shadow"></span> Features for decorating text,
such as <a href="http://www.w3.org/TR/css-text-decor-3/#line-decoration">underlines</a>, <a href="http://www.w3.org/TR/css-text-decor-3/#emphasis-marks">emphasis marks</a>,
and <a href="http://www.w3.org/TR/css-text-decor-3/#text-shadow-property">shadows</a>,
(previously part of this module)
are covered in <a href="http://www.w3.org/TR/css-text-decor-3/">CSS Text Decoration Level 3</a> <a data-link-type="biblio" href="#biblio-css3-text-decor">[CSS3-TEXT-DECOR]</a>. </p>
<p><a href="http://www.w3.org/TR/css3-writing-modes/#text-direction">Bidirectional</a> and <a href="http://www.w3.org/TR/css3-writing-modes/#vertical-intro">vertical</a> text
are addressed in <a href="http://www.w3.org/TR/css3-writing-modes/">CSS Writing Modes Level 3</a> <a data-link-type="biblio" href="#biblio-css3-writing-modes">[CSS3-WRITING-MODES]</a>. </p>
</div>
<h3 class="heading settled" data-level="1.1" id="placement"><span class="secno">1.1. </span><span class="content"> Module Interactions</span><a class="self-link" href="#placement"></a></h3>
<p>This module, together with <a data-link-type="biblio" href="#biblio-css3-text-decor">[CSS3-TEXT-DECOR]</a>,
replaces and extends the text-level features defined in <a data-link-type="biblio" href="#biblio-css21">[CSS21]</a> chapter 16. </p>
<h3 class="heading settled" data-level="1.2" id="values"><span class="secno">1.2. </span><span class="content"> Values</span><a class="self-link" href="#values"></a></h3>
<p>This specification follows the <a href="http://www.w3.org/TR/CSS21/about.html#property-defs">CSS property
definition conventions</a> from <a data-link-type="biblio" href="#biblio-css21">[CSS21]</a>. Value types not defined in
this specification are defined in CSS Level 2 Revision 1 <a data-link-type="biblio" href="#biblio-css21">[CSS21]</a>.
Other CSS modules may expand the definitions of these value types: for
example <a data-link-type="biblio" href="#biblio-css3val">[CSS3VAL]</a>, when combined with this module, expands the
definition of the <var>&lt;length></var> value type as used in this specification.</p>
<p>In addition to the property-specific values listed in their definitions,
all properties defined in this specification also accept the <a href="http://www.w3.org/TR/CSS21/cascade.html#value-def-inherit">inherit</a> keyword as their property value. For readability it has not been repeated
explicitly. </p>
<h3 class="heading settled" data-level="1.3" id="terms"><span class="secno">1.3. </span><span class="content"> Terminology</span><a class="self-link" href="#terms"></a></h3>
<p>In addition to the terms defined below,
other terminology and concepts used in this specification are defined
in <a data-link-type="biblio" href="#biblio-css21">[CSS21]</a> and <a data-link-type="biblio" href="#biblio-css3-writing-modes">[CSS3-WRITING-MODES]</a>. </p>
<h4 class="heading settled" data-level="1.3.1" id="characters"><span class="secno">1.3.1. </span><span class="content"> Characters and Letters</span><a class="self-link" href="#characters"></a></h4>
<p>The basic unit of typesetting is the <dfn data-dfn-type="dfn" data-noexport="" id="character">character<a class="self-link" href="#character"></a></dfn>.
However, because writing systems are not always as simple as the basic English alphabet,
what a <a data-link-type="dfn" href="#character">character</a> 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. <span lang="ko-hang" title="Hangul syllable HAN">한</span>=<span lang="ko-Latn">Han</span>)
can be considered a <a data-link-type="dfn" href="#character">character</a>.
However, the square symbol is really composed of multiple letters each representing a phoneme
(e.g. <span lang="ko-hang" title="Hangul letter HIEUH">ㅎ</span>=<span lang="ko-Latn">h</span>, <span lang="ko-hang" title="Hangul letter HIEUH">ㅏ</span>=<span lang="ko-Latn">a</span>, <span lang="ko-hang" title="Hangul letter HIEUH">ㄴ</span>=<span lang="ko-Latn">n</span>)
and these also could each be considered a <a data-link-type="dfn" href="#character">character</a>. </p>
<p>A basic unit of computer text encoding, for any given encoding,
is also called a <a data-link-type="dfn" href="#character">character</a>,
and depending on the encoding,
a single encoding <a data-link-type="dfn" href="#character">character</a> might correspond
to the entire pre-composed syllabic <a data-link-type="dfn" href="#character">character</a> (e.g. <span lang="ko-hang" title="Hangul syllable HAN">한</span>),
to the individual phonemic <a data-link-type="dfn" href="#character">character</a> (e.g. <span lang="ko-hang" title="Hangul letter HIEUH">ㅎ</span>),
or to smaller units such as
a base letterform (e.g. <span lang="ko-hang" title="Hangul letter IEUNG">ㅇ</span>)
and any combining marks that vary it (e.g. extra strokes that represent aspiration). </p>
<p>In turn, a single encoding <a data-link-type="dfn" href="#character">character</a> can be represented in the data stream as one or more bytes;
and in programming environments one byte is sometimes also called a <a data-link-type="dfn" href="#character">character</a>. </p>
<p>For text layout, we will refer to the <dfn data-dfn-type="dfn" data-export="" data-lt="typographic character unit|typographic character" id="typographic-character-unit">typographic character unit<a class="self-link" href="#typographic-character-unit"></a></dfn> as the basic unit of text.
Even within the realm of text layout,
the relevant <a data-link-type="dfn" href="#character">character</a> 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 <a data-link-type="dfn" href="#typographic-character-unit">typographic character</a> 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.). </p>
<p><a href="http://www.unicode.org/reports/tr29/">Unicode Standard Annex #29: Text Segmentation</a> defines a unit called the <dfn data-dfn-type="dfn" data-noexport="" id="grapheme-cluster">grapheme cluster<a class="self-link" href="#grapheme-cluster"></a></dfn> which approximates the <a data-link-type="dfn" href="#typographic-character-unit">typographic character</a>.
A UA must use the <em>extended grapheme cluster</em> (not <em>legacy grapheme cluster</em>), as defined in <a data-link-type="biblio" href="#biblio-uax29">[UAX29]</a>,
as the basis for its <a data-link-type="dfn" href="#typographic-character-unit">typographic character unit</a>.
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.</p>
<div class="example" id="example-645d2d72">
<a class="self-link" href="#example-645d2d72"></a>
<p>For example,
in some scripts such as Myanmar or Devanagari,
the <a data-link-type="dfn" href="#typographic-character-unit">typographic character unit</a> for both justification and line-breaking
is an entire syllable,
which can include more than one <a data-link-type="biblio" href="#biblio-uax29">[UAX29]</a> <a data-link-type="dfn" href="#grapheme-cluster">grapheme cluster</a>. </p>
<p>In other scripts such as Thai or Lao,
even though for line-breaking the <a data-link-type="dfn" href="#typographic-character-unit">typographic character</a> matches Unicode’s default <a data-link-type="dfn" href="#grapheme-cluster">grapheme clusters</a>,
for letter-spacing the relevant unit
is <em>less</em> than a <a data-link-type="biblio" href="#biblio-uax29">[UAX29]</a> <a data-link-type="dfn" href="#grapheme-cluster">grapheme cluster</a>,
and may require decomposition or other substitutions
before spacing can be inserted. </p>
<p>For instance,
to properly letter-space the Thai word คำ (U+0E04 + U+0E33),
the U+0E33 needs to be decomposed into U+0E4D + U+0E32,
and then the extra letter-space inserted before the U+0E32: คํ า. </p>
<p>A slightly more complex example is น้ำ (U+0E19 + U+0E49 + U+0E33).
In this case, normal Thai shaping will first decompose the U+0E33 into U+0E4D + U+0E32
and then swap the U+0E4D with the U+0E49, giving U+0E19 + U+0E4D + U+0E49 + U+0E32.
As before the extra letter-space is then inserted before the U+0E32: นํ้ า. </p>
</div>
<p>A <dfn data-dfn-type="dfn" data-export="" id="typographic-letter-unit">typographic letter unit<a class="self-link" href="#typographic-letter-unit"></a></dfn> or <dfn data-dfn-type="dfn" data-noexport="" id="letter">letter<a class="self-link" href="#letter"></a></dfn> for the purpose of this specification
is a <a data-link-type="dfn" href="#typographic-character-unit">typographic character unit</a> belonging to one of the Letter or Number general
categories in Unicode. <a data-link-type="biblio" href="#biblio-uax44">[UAX44]</a> See <a href="#character-properties">Character Properties</a> for how to determine the Unicode properties of a <a data-link-type="dfn" href="#typographic-character-unit">typographic character unit</a>. </p>
<p>The rendering characteristics of a <a data-link-type="dfn" href="#typographic-character-unit">typographic character unit</a> divided
by an element boundary is undefined:
it may be rendered as belonging to either side of the boundary,
or as some approximation of belonging to both.
Authors are forewarned that dividing <a data-link-type="dfn" href="#grapheme-cluster">grapheme clusters</a> by element boundaries may give inconsistent or undesired results. </p>
<h4 class="heading settled" data-level="1.3.2" id="languages"><span class="secno">1.3.2. </span><span class="content"> Languages and Typesetting</span><a class="self-link" href="#languages"></a></h4>
<p class="note" role="note"> Many typographic effects vary by linguistic context.
In CSS, language-specific typographic tailorings
are only applied when the content language is known (declared). </p>
<p><strong class="advisement"> Authors should language-tag their content accurately for the best typographic behavior. </strong> </p>
<p>The <dfn data-dfn-type="dfn" data-noexport="" id="content-language">content language<a class="self-link" href="#content-language"></a></dfn> of an element is the (human) language
the element is declared to be in, according to the rules of the <a href="http://www.w3.org/TR/CSS21/conform.html#doclanguage">document language</a>.
For example, the rules for determining the <a data-link-type="dfn" href="#content-language">content language</a> of an HTML
element use the <code>lang</code> attribute and are defined in <a data-link-type="biblio" href="#biblio-html5">[HTML5]</a>,
and the rules for determining the <a data-link-type="dfn" href="#content-language">content language</a> of an XML element use
the <code>xml:lang</code> attribute and are <a href="http://www.w3.org/TR/REC-xml/#sec-lang-tag">defined</a> in <a data-link-type="biblio" href="#biblio-xml10">[XML10]</a>.
Note that it is possible for the <a data-link-type="dfn" href="#content-language">content language</a> of an element
to be unknown. </p>
<h2 class="heading settled" data-level="2" id="transforming"><span class="secno">2. </span><span class="content"> Transforming Text</span><a class="self-link" href="#transforming"></a></h2>
<h3 class="heading settled" data-level="2.1" id="text-transform-property"><span class="secno">2.1. </span><span class="content"> <span id="caps-prop"></span> <span id="text-transform"></span> Case Transforms: the <a class="property" data-link-type="propdesc" href="#propdef-text-transform">text-transform</a> property</span><a class="self-link" href="#text-transform-property"></a></h3>
<table class="propdef">
<tbody>
<tr>
<th>Name:
<td><dfn class="css" data-dfn-type="property" data-export="" id="propdef-text-transform">text-transform<a class="self-link" href="#propdef-text-transform"></a></dfn>
<tr>
<th><a href="#values">Value</a>:
<td>none | capitalize | uppercase | lowercase | full-width
<tr>
<th>Initial:
<td>none
<tr>
<th>Applies to:
<td>all elements
<tr>
<th>Inherited:
<td>yes
<tr>
<th>Percentages:
<td>N/A
<tr>
<th>Media:
<td>visual
<tr>
<th>Computed value:
<td>as specified
<tr>
<th>Animatable:
<td>no
<tr>
<th>Canonical order:
<td>N/A
</table>
<p>This property transforms text for styling purposes.
(It has no effect on the underlying content.)
Values have the following meanings:</p>
<dl>
<dt><dfn class="css" data-dfn-for="text-transform" data-dfn-type="value" data-export="" id="valdef-text-transform-none">none<a class="self-link" href="#valdef-text-transform-none"></a></dfn>
<dd>No effects.
<dt><dfn class="css" data-dfn-for="text-transform" data-dfn-type="value" data-export="" id="valdef-text-transform-capitalize">capitalize<a class="self-link" href="#valdef-text-transform-capitalize"></a></dfn>
<dd>Puts the first <a data-link-type="dfn" href="#typographic-letter-unit">typographic letter unit</a> of each word in titlecase;
other characters are unaffected.
<dt><dfn class="css" data-dfn-for="text-transform" data-dfn-type="value" data-export="" id="valdef-text-transform-uppercase">uppercase<a class="self-link" href="#valdef-text-transform-uppercase"></a></dfn>
<dd>Puts all lettersin uppercase.
<dt><dfn class="css" data-dfn-for="text-transform" data-dfn-type="value" data-export="" id="valdef-text-transform-lowercase">lowercase<a class="self-link" href="#valdef-text-transform-lowercase"></a></dfn>
<dd>Puts all letters in lowercase.
<dt><dfn class="css" data-dfn-for="text-transform" data-dfn-type="value" data-export="" id="valdef-text-transform-full-width">full-width<a class="self-link" href="#valdef-text-transform-full-width"></a></dfn>
<dd>Puts all <a data-link-type="dfn" href="#typographic-character-unit">typographic character units</a> 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.
</dl>
<p>For <a class="css" data-link-type="maybe" href="#valdef-text-transform-capitalize">capitalize</a>, what constitutes a “word“ is UA-dependent; <a data-link-type="biblio" href="#biblio-uax29">[UAX29]</a> is suggested (but not required) for determining such word
boundaries. Authors should not expect <a class="css" data-link-type="maybe" href="#valdef-text-transform-capitalize">capitalize</a> to follow
language-specific titlecasing conventions (such as skipping articles
in English). </p>
<div class="example" id="example-7cb4bb58">
<a class="self-link" href="#example-7cb4bb58"></a>
<p>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: </p>
<pre>abbr:lang(ja) { text-transform: full-width; }</pre>
</div>
<p class="note" role="note"> Note that, as defined in <a href="#order">Text Processing Order of Operations</a>,
transforming text affects line-breaking and other formatting operations. </p>
<p> 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 <a data-link-type="biblio" href="#biblio-unicode">[UNICODE]</a>.
If (and only if) the <a data-link-type="dfn" href="#content-language">content language</a> of the element is, according to the rules of the <a href="http://www.w3.org/TR/CSS21/conform.html#doclanguage">document language</a>,
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 <a href="http://www.unicode.org/Public/UNIDATA/SpecialCasing.txt">SpecialCasing.txt</a>. </p>
<div class="example" id="example-12e88f74">
<a class="self-link" href="#example-12e88f74"></a>
<p>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 <a data-link-type="dfn" href="#content-language">content language</a> is Turkish
(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. </p>
</div>
<p>The definition of fullwidth and halfwidth forms can be found on the
Unicode consortium web site at <a data-link-type="biblio" href="#biblio-uax11">[UAX11]</a>.
The mapping to fullwidth form is defined by taking code points with
the <code>&lt;wide></code> or the <code>&lt;narrow></code> tag
in their <code>Decomposition_Mapping</code> in <a data-link-type="biblio" href="#biblio-uax44">[UAX44]</a>.
For the <code>&lt;narrow></code> tag,
the mapping is from the code point to the decomposition (minus <code>&lt;narrow></code> tag),
and for the <code>&lt;wide></code> tag,
the mapping is from the decomposition (minus the <code>&lt;wide></code> tag)
back to the original code point. </p>
<p>Text transformation happens after <a href="#white-space-rules">white
space processing</a>, which means that <a class="css" data-link-type="maybe" href="#valdef-text-transform-full-width">full-width</a> only transforms
U+0020 spaces to U+3000 within <a data-link-type="dfn" href="#preserved">preserved</a> white space. </p>
<p class="note" role="note"> A future level of CSS may introduce the ability to create custom mapping
tables for less common text transforms, such as by an <span class="css">@text-transform</span> rule similar to <a class="css" data-link-type="maybe" href="https://drafts.csswg.org/css-counter-styles-3/#at-ruledef-counter-style">@counter-style</a> from <a data-link-type="biblio" href="#biblio-css-counter-styles-3">[CSS-COUNTER-STYLES-3]</a>. </p>
<h2 class="heading settled" data-level="3" id="white-space-property"><span class="secno">3. </span><span class="content"> <span id="white-space-collapsing"></span><span id="text-wrap"></span> White Space and Wrapping: the <a class="property" data-link-type="propdesc" href="#propdef-white-space">white-space</a> property</span><a class="self-link" href="#white-space-property"></a></h2>
<table class="propdef">
<tbody>
<tr>
<th>Name:
<td><dfn class="css" data-dfn-type="property" data-export="" id="propdef-white-space">white-space<a class="self-link" href="#propdef-white-space"></a></dfn>
<tr>
<th><a href="#values">Value</a>:
<td>normal | pre | nowrap | pre-wrap | pre-wrap-auto | pre-line
<tr>
<th>Initial:
<td>normal
<tr>
<th>Applies to:
<td>all elements
<tr>
<th>Inherited:
<td>yes
<tr>
<th>Percentages:
<td>N/A
<tr>
<th>Media:
<td>visual
<tr>
<th>Computed value:
<td>as specified
<tr>
<th>Animatable:
<td>no
<tr>
<th>Canonical order:
<td>N/A
</table>
<p>This property specifies two things: </p>
<ul>
<li>whether and how <a data-link-type="dfn" href="#white-space">white space</a> inside the element is collapsed
<li>whether lines may <a data-link-type="dfn" href="#wrapping">wrap</a> at unforced <a data-link-type="dfn" href="#soft-wrap-opportunity">soft wrap opportunities</a>
</ul>
<p>Values have the following meanings, which must be interpreted
according to
the <a href="#white-space-rules">White Space Processing</a> and <a href="#line-breaking">Line Breaking</a> rules:</p>
<dl>
<dt><dfn class="css" data-dfn-for="white-space" data-dfn-type="value" data-export="" id="valdef-white-space-normal">normal<a class="self-link" href="#valdef-white-space-normal"></a></dfn>
<dd>This value directs user agents to collapse sequences of <a data-link-type="dfn" href="#white-space">white space</a> into a single character (or <a href="#line-break-transform">in some
cases</a>, no character).
Lines may wrap at allowed <a data-link-type="dfn" href="#soft-wrap-opportunity">soft wrap opportunities</a>,
as determined by the line-breaking rules in effect,
in order to minimize inline-axis overflow.
<dt><dfn class="css" data-dfn-for="white-space" data-dfn-type="value" data-export="" id="valdef-white-space-pre">pre<a class="self-link" href="#valdef-white-space-pre"></a></dfn>
<dd>This value prevents user agents from collapsing sequences of <a data-link-type="dfn" href="#white-space">white space</a>. <a data-link-type="dfn" href="#segment-break">Segment breaks</a> such as line feeds and carriage returns are preserved as <a data-link-type="dfn" href="#forced-line-break">forced line breaks</a>.
Lines only break at <a data-link-type="dfn" href="#forced-line-break">forced line breaks</a>;
content that does not fit within the block container overflows it.
<dt><dfn class="css" data-dfn-for="white-space" data-dfn-type="value" data-export="" id="valdef-white-space-nowrap">nowrap<a class="self-link" href="#valdef-white-space-nowrap"></a></dfn>
<dd>Like <a class="css" data-link-type="maybe" href="#valdef-white-space-normal">normal</a>, this value collapses <a data-link-type="dfn" href="#white-space">white space</a>;
but like <a class="css" data-link-type="maybe" href="#valdef-white-space-pre">pre</a>, it does not allow wrapping.
<dt><dfn class="css" data-dfn-for="white-space" data-dfn-type="value" data-export="" id="valdef-white-space-pre-wrap">pre-wrap<a class="self-link" href="#valdef-white-space-pre-wrap"></a></dfn>
<dd>Like <a class="css" data-link-type="maybe" href="#valdef-white-space-pre">pre</a>, this value preserves <a data-link-type="dfn" href="#white-space">white space</a>;
but like <a class="css" data-link-type="maybe" href="#valdef-white-space-normal">normal</a>, it allows wrapping.
<dt><dfn class="css" data-dfn-for="white-space" data-dfn-type="value" data-export="" id="valdef-white-space-pre-wrap-auto">pre-wrap-auto<a class="self-link" href="#valdef-white-space-pre-wrap-auto"></a></dfn>
<dd>Like <a class="css" data-link-type="maybe" href="#valdef-white-space-pre-wrap">pre-wrap</a>, this value preserves <a data-link-type="dfn" href="#white-space">white space</a> and allows wrapping.
However, some of the behavior is made UA dependent
(See <a href="#white-space-rules">The White Space Processing Rules</a> for details).
This flexibility allows UAs to match platform conventions,
in particular with respect to multi-line editable text fields,
and when preserved <a data-link-type="dfn" href="#white-space">white space</a> at the end a line
would cause the line to overflow.
<dt><dfn class="css" data-dfn-for="white-space" data-dfn-type="value" data-export="" id="valdef-white-space-pre-line">pre-line<a class="self-link" href="#valdef-white-space-pre-line"></a></dfn>
<dd>Like <a class="css" data-link-type="maybe" href="#valdef-white-space-normal">normal</a>, this value collapses consecutive spaces and allows wrapping,
but preserves <a data-link-type="dfn" href="#segment-break">segment breaks</a> in the source as <a data-link-type="dfn" href="#forced-line-break">forced line breaks</a>.
</dl>
<p class="issue" id="issue-5b12ad37"><a class="self-link" href="#issue-5b12ad37"></a> Suggestions of a better name for <a class="css" data-link-type="maybe" href="#valdef-white-space-pre-wrap-auto">pre-wrap-auto</a> are welcome.</p>
<p class="note" role="note">Note: <a class="css" data-link-type="maybe" href="#valdef-white-space-pre-wrap-auto">pre-wrap-auto</a> is at risk.</p>
<p>The following informative table summarizes the behavior of various <a class="property" data-link-type="propdesc" href="#propdef-white-space">white-space</a> values:</p>
<table class="data">
<colgroup class="header"></colgroup>
<colgroup span="3"></colgroup>
<thead>
<tr>
<th>
<th>New Lines
<th>Spaces and Tabs
<th>Text Wrapping
<tbody>
<tr>
<th><a class="css" data-link-type="maybe" href="#valdef-white-space-normal">normal</a>
<td>Collapse
<td>Collapse
<td>Wrap
<tr>
<th><a class="css" data-link-type="maybe" href="#valdef-white-space-pre">pre</a>
<td>Preserve
<td>Preserve
<td>No wrap
<tr>
<th><a class="css" data-link-type="maybe" href="#valdef-white-space-nowrap">nowrap</a>
<td>Collapse
<td>Collapse
<td>No wrap
<tr>
<th><a class="css" data-link-type="maybe" href="#valdef-white-space-pre-wrap">pre-wrap</a>
<td>Preserve
<td>Preserve
<td>Wrap
<tr>
<th><a class="css" data-link-type="maybe" href="#valdef-white-space-pre-wrap-auto">pre-wrap-auto</a>
<td>Preserve
<td>Preserve
<td>Wrap
<tr>
<th><a class="css" data-link-type="maybe" href="#valdef-white-space-pre-line">pre-line</a>
<td>Preserve
<td>Collapse
<td>Wrap
</table>
<p>See <a href="#white-space-processing">White Space Processing Rules</a> for details on how white space collapses. An informative summary of
collapsing (<a class="css" data-link-type="maybe" href="#valdef-white-space-normal">normal</a> and <a class="css" data-link-type="maybe" href="#valdef-white-space-nowrap">nowrap</a>) is presented below: </p>
<ul>
<li>A sequence of segment breaks and other <a data-link-type="dfn" href="#white-space">white space</a> between two
Chinese, Japanese, or Yi characters collapses into nothing.
<li>A zero width space before or after a white space sequence
containing a segment break causes the entire sequence of <a data-link-type="dfn" href="#white-space">white space</a> to collapse into a zero width space.
<li>Otherwise, consecutive <a data-link-type="dfn" href="#white-space">white space</a> collapses into a single space.
</ul>
<p>See <a href="#line-breaking">Line Breaking</a> for details on wrapping behavior. </p>
<h2 class="heading settled" data-level="4" id="white-space-processing"><span class="secno">4. </span><span class="content"> White Space Processing Details</span><a class="self-link" href="#white-space-processing"></a></h2>
<p>The source text of a document often contains formatting
that is not relevant to the final rendering: for example, <a href="http://rhodesmill.org/brandon/2012/one-sentence-per-line/">breaking the source into segments</a> (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. </p>
<p>White space processing in CSS is controlled with the <a class="property" data-link-type="propdesc" href="#propdef-white-space">white-space</a> property. </p>
<p id="segment-normalization"> 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 <code>RECORD-START</code> and <code>RECORD-END</code> tokens.
For CSS processing, each document language–defined segment break,
CRLF sequence (U+000D U+000A), carriage return (U+000D), and line feed (U+000A)
in the text is treated as a <dfn data-dfn-type="dfn" data-export="" id="segment-break">segment break<a class="self-link" href="#segment-break"></a></dfn>,
which is then interpreted for rendering as specified by the <a class="property" data-link-type="propdesc" href="#propdef-white-space">white-space</a> property. </p>
<p class="note" role="note">Note that a document parser might
not only normalize any <a data-link-type="dfn" href="#segment-break">segment breaks</a>,
but also collapse other space characters or
otherwise process white space according to markup rules.
Because CSS processing occurs <em>after</em> 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.</p>
<p class="note" role="note">Note that anonymous blocks consisting entirely of <a data-link-type="dfn" href="#collapsible-white-space">collapsible</a> <a data-link-type="dfn" href="#white-space">white space</a> are removed from the rendering tree.
Thus any such <a data-link-type="dfn" href="#white-space">white space</a> surrounding a block-level element is collapsed away.
See <a data-link-type="biblio" href="#biblio-css21">[CSS21]</a> section <a href="http://www.w3.org/TR/CSS21/visuren.html#anonymous">9.2.2.1</a></p>
<p> Control characters (<a data-link-type="dfn" href="#unicode-general-category">Unicode category</a> <code>Cc</code>)
other than tab (U+0009), line feed (U+000A), and carriage return (U+000D)
must be rendered as a visible glyph
and otherwise treated as any other character
of the Other Symbols (<code>So</code>) <a data-link-type="dfn" href="#unicode-general-category">general category</a> and Common <a data-link-type="dfn" href="#unicode-script">script</a>.
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 codepoint value,
or use some other method to provide an appropriate visible glyph.
As required by <a data-link-type="biblio" href="#biblio-unicode">[UNICODE]</a>,
unsupported <code>Default_ignorable</code> characters must be ignored for rendering. </p>
<h3 class="heading settled" data-level="4.1" id="white-space-rules"><span class="secno">4.1. </span><span class="content"> The White Space Processing Rules</span><a class="self-link" href="#white-space-rules"></a></h3>
<p>White space processing in CSS affects only
the <dfn data-dfn-type="dfn" data-export="" data-lt="white space|white space characters| document white space|document white space characters" id="white-space">document white space characters<a class="self-link" href="#white-space"></a></dfn>:
spaces (U+0020), tabs (U+0009), and <a href="#white-space-processing">segment breaks</a>. </p>
<p class="note" role="note"> Note that the set of characters considered <a data-link-type="dfn" href="#white-space">document white space</a> (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), line feeds (U+000A), and carriage returns (U+000D)
most authors won’t notice any differences. </p>
<h4 class="heading settled" data-level="4.1.1" id="white-space-phase-1"><span class="secno">4.1.1. </span><span class="content">Phase I: Collapsing and Transformation</span><a class="self-link" href="#white-space-phase-1"></a></h4>
<p>For each inline (including anonymous inlines;
see <a data-link-type="biblio" href="#biblio-css21">[CSS21]</a> section <a href="http://www.w3.org/TR/CSS21/visuren.html#anonymous">9.2.2.1</a>)
within an inline
formatting context, white space characters are handled as follows,
ignoring bidi formatting characters as if they were not there:</p>
<ul>
<li id="collapse">
<a class="self-link" href="#collapse"></a>
<p>If <a class="property" data-link-type="propdesc" href="#propdef-white-space">white-space</a> is set to <a class="css" data-link-type="maybe" href="#valdef-white-space-normal">normal</a>, <a class="css" data-link-type="maybe" href="#valdef-white-space-nowrap">nowrap</a>, or <a class="css" data-link-type="maybe" href="#valdef-white-space-pre-line">pre-line</a>,
white space characters are considered <dfn data-dfn-type="dfn" data-export="" data-lt="collapsible white space|collapsible" id="collapsible-white-space">collapsible<a class="self-link" href="#collapsible-white-space"></a></dfn> and are processed by performing the following steps:</p>
<ol>
<li>All spaces and tabs immediately preceding or following a segment
break are removed.
<li><a data-link-type="dfn" href="#segment-break">Segment breaks</a> are transformed for
rendering according to the <a href="#line-break-transform">segment break transformation rules</a>.
<li>Every tab is converted to a space (U+0020).
<li>Any space immediately following another collapsible space—even
one outside the boundary of the inline containing that space,
provided both spaces are within the same inline formatting
context—is collapsed to have zero advance width. (It is
invisible, but retains its <a data-link-type="dfn" href="#soft-wrap-opportunity">soft wrap opportunity</a>, if any.)
</ol>
<li>
<p>If <a class="property" data-link-type="propdesc" href="#propdef-white-space">white-space</a> is set to <a class="css" data-link-type="maybe" href="#valdef-white-space-pre-wrap">pre-wrap</a>,
any sequence of spaces is preserved.
This is achieved by treating it as a sequence of non-breaking spaces,
except that a <a data-link-type="dfn" href="#soft-wrap-opportunity">soft wrap opportunity</a> exists
between each of the spaces of this preserved sequence,
as well as at the beginning
and at the end of the sequence.</p>
<li>
<p>If <a class="property" data-link-type="propdesc" href="#propdef-white-space">white-space</a> is set to <a class="css" data-link-type="maybe" href="#valdef-white-space-pre-wrap-auto">pre-wrap-auto</a>,
any sequence of spaces is preserved.
This is achieved by treating it as a sequence of non-breaking spaces.
However, unlike with <a class="css" data-link-type="maybe" href="#valdef-white-space-pre-wrap">pre-wrap</a>,
whether <a data-link-type="dfn" href="#soft-wrap-opportunity">soft wrap opportunities</a> exist in this sequence
is user-agent defined.
These UA-specific rules may be context dependent.</p>
</ul>
<p>Then, the entire block is rendered. Inlines are laid out, taking bidi
reordering into account, and <a data-link-type="dfn" href="#wrapping">wrapping</a> as specified by the <a class="property" data-link-type="propdesc" href="#propdef-white-space">white-space</a> property.</p>
<div class="example" id="egbidiwscollapse">
<a class="self-link" href="#egbidiwscollapse"></a>
<p>The following example illustrates
the interaction of white-space collapsing and bidirectionality.
Consider the following markup fragment, taking special note of spaces
(with varied backgrounds and borders for emphasis and identification): </p>
<pre><code>&lt;ltr>A<span class="egbidiwsaA"> </span>&lt;rtl><span class="egbidiwsbB"> </span>B<span class="egbidiwsaB"> </span>&lt;/rtl><span class="egbidiwsbC"> </span>C&lt;/ltr></code></pre>
<p>where the <code>&lt;ltr></code> element represents a left-to-right embedding
and the <code>&lt;rtl></code> element represents a right-to-left embedding.
If the <a class="property" data-link-type="propdesc" href="#propdef-white-space">white-space</a> property is set to <a class="css" data-link-type="maybe" href="#valdef-white-space-normal">normal</a>,
the white-space processing model will result in the following: </p>
<ul style="line-height:1.3">
<li>The space before the B (<span class="egbidiwsbB"> </span>)
will collapse with the space after the A (<span class="egbidiwsaA"> </span>).
<li>The space before the C (<span class="egbidiwsbC"> </span>)
will collapse with the space after the B (<span class="egbidiwsaB"> </span>).
</ul>
<p>This will leave two spaces,
one after the A in the left-to-right embedding level,
and one after the B in the right-to-left embedding level.
The text will then be ordered according to the Unicode bidirectional algorithm,
with the end result being: </p>
<pre>A<span cl 62B4 ass="egbidiwsaA"> </span><span class="egbidiwsaB"> </span>BC</pre>
<p>Note that there will be two spaces between A and B,
and none between B and C.
This is best avoided by putting spaces outside the element
instead of just inside the opening and closing tags and, where practical,
by relying on implicit bidirectionality instead of explicit embedding levels. </p>
</div>
<h4 class="heading settled" data-level="4.1.2" id="line-break-transform"><span class="secno">4.1.2. </span><span class="content"> Segment Break Transformation Rules</span><a class="self-link" href="#line-break-transform"></a></h4>
<p>When <a class="property" data-link-type="propdesc" href="#propdef-white-space">white-space</a> is <a class="css" data-link-type="maybe" href="#valdef-white-space-pre">pre</a>, <a class="css" data-link-type="maybe" href="#valdef-white-space-pre-wrap">pre-wrap</a>, <a class="css" data-link-type="maybe" href="#valdef-white-space-pre-wrap-auto">pre-wrap-auto</a>, or <a class="css" data-link-type="maybe" href="#valdef-white-space-pre-line">pre-line</a>, <a data-link-type="dfn" href="#segment-break">segment breaks</a> are not <a data-link-type="dfn" href="#collapsible-white-space">collapsible</a> and are instead transformed into a preserved line feed (U+000A). </p>
<p>For other values of <a class="property" data-link-type="propdesc" href="#propdef-white-space">white-space</a>, <a data-link-type="dfn" href="#segment-break">segment breaks</a> are <a data-link-type="dfn" href="#collapsible-white-space">collapsible</a>,
and are either transformed into a space (U+0020) or removed
depending on the context before and after the break:</p>
<ul>
<li>If the character immediately before or immediately after the segment
break is the zero-width space character (U+200B), then the break
is removed, leaving behind the zero-width space.
<li>Otherwise, if the <a data-link-type="dfn" href="#unicode-east-asian-width">East Asian Width property</a> <a data-link-type="biblio" href="#biblio-uax11">[UAX11]</a> of both
the character before and after the line feed is <code>F</code>, <code>W</code>, or <code>H</code> (not <code>A</code>),
and neither side is Hangul, then the segment break is removed.
<li>Otherwise, the segment break is converted to a space (U+0020).
</ul>
<p class="note" role="note">Note that the white space processing rules have already
removed any tabs and spaces after the segment break before these checks
take place.</p>
<p class="feedback issue" id="issue-92b50b8c"><a class="self-link" href="#issue-92b50b8c"></a>Comments on how well this would work in practice would
be very much appreciated, particularly from people who work with
Thai and similar scripts.
Note that browser implementations do not currently follow these rules
(although IE does in some cases transform the break).</p>
<h4 class="heading settled" data-level="4.1.3" id="white-space-phase-2"><span class="secno">4.1.3. </span><span class="content">Phase II: Trimming and Positioning</span><a class="self-link" href="#white-space-phase-2"></a></h4>
<p>As each line is laid out,</p>
<ol>
<li>A sequence of collapsible spaces at the beginning of a line is
removed.
<li>Each tab is rendered as a horizontal shift
that lines up the start edge of the next glyph with the next <a data-link-type="dfn" href="#tab-stop">tab stop</a>. <dfn data-dfn-type="dfn" data-lt="tab stop" data-noexport="" id="tab-stop">Tab stops<a class="self-link" href="#tab-stop"></a></dfn> occur at points that are multiples of the tab size
from the block’s starting content edge.
The tab size is given by the <a class="property" data-link-type="propdesc" href="#propdef-tab-size">tab-size</a> property.
<li>A sequence of <a data-link-type="dfn" href="#collapsible-white-space">collapsible</a> spaces at the end of a line is removed.
<li>If spaces or tabs at the end of a line are non-collapsible but
have <a class="property" data-link-type="propdesc" href="#propdef-white-space">white-space</a> set to <a class="css" data-link-type="maybe" href="#valdef-white-space-pre-wrap-auto">pre-wrap-auto</a> the UA may visually
collapse their character advance widths.
</ol>
<p>White space that was not removed or collapsed during the white space
processing steps is called <dfn data-dfn-type="dfn" data-noexport="" id="preserved">preserved<a class="self-link" href="#preserved"></a></dfn> white space.</p>
<h3 class="heading settled" data-level="4.2" id="tab-size-property"><span class="secno">4.2. </span><span class="content"> Tab Character Size: the <a class="property" data-link-type="propdesc" href="#propdef-tab-size">tab-size</a> property</span><a class="self-link" href="#tab-size-property"></a></h3>
<table class="propdef">
<tbody>
<tr>
<th>Name:
<td><dfn class="css" data-dfn-type="property" data-export="" id="propdef-tab-size">tab-size<a class="self-link" href="#propdef-tab-size"></a></dfn>
<tr>
<th><a href="#values">Value</a>:
<td>&lt;integer> | &lt;length>
<tr>
<th>Initial:
<td>8
<tr>
<th>Applies to:
<td>block containers
<tr>
<th>Inherited:
<td>yes
<tr>
<th>Percentages:
<td>N/A
<tr>
<th>Media:
<td>visual
<tr>
<th>Computed value:
<td>the specified integer or length made absolute
<tr>
<th>Animatable:
<td>as <a href="http://www.w3.org/TR/css3-transitions/#animtype-length">length</a>
<tr>
<th>Canonical order:
<td>N/A
</table>
<p>This property determines the tab size used to render preserved tab characters (U+0009).
Integers represent the measure as multiples of the space character’s advance width (U+0020).
Negative values are not allowed. </p>
<h2 class="heading settled" data-level="5" id="line-breaking"><span class="secno">5. </span><span class="content"> Line Breaking and Word Boundaries</span><a class="self-link" href="#line-breaking"></a></h2>
<p>When inline-level content is laid out into lines, it is broken across line boxes.
Such a break is called a <dfn data-dfn-type="dfn" data-noexport="" id="line-break">line break<a class="self-link" href="#line-break"></a></dfn>.
When a line is broken due to explicit line-breaking controls,
or due to the start or end of a block,
it is a <dfn data-dfn-type="dfn" data-noexport="" id="forced-line-break">forced line break<a class="self-link" href="#forced-line-break"></a></dfn>.
When a line is broken due to content <dfn data-dfn-type="dfn" data-lt="wrapping|wrap" data-noexport="" id="wrapping">wrapping<a class="self-link" href="#wrapping"></a></dfn> (i.e. when the UA creates unforced line breaks in order to fit the content within the measure),
it is a <dfn data-dfn-type="dfn" data-noexport="" id="soft-wrap-break">soft wrap break<a class="self-link" href="#soft-wrap-break"></a></dfn>.
The process of breaking inline-level content into lines is called <dfn data-dfn-type="dfn" data-lt="line-breaking-process" data-noexport="" id="line-breaking-process">line breaking<a class="self-link" href="#line-breaking-process"></a></dfn>. </p>
<p>Wrapping is only performed at an allowed break point, called a <dfn data-dfn-type="dfn" data-export="" id="soft-wrap-opportunity">soft wrap opportunity<a class="self-link" href="#soft-wrap-opportunity"></a></dfn>. </p>
<p>In most writing systems,
in the absence of hyphenation a <a data-link-type="dfn" href="#soft-wrap-opportunity">soft wrap opportunity</a> occurs only at word boundaries.
Many such systems use spaces or punctuation to explicitly separate words,
and <a data-link-type="dfn" href="#soft-wrap-opportunity">soft wrap opportunities</a> can be identified by these characters.
Scripts such as Thai, Lao, and Khmer, however,
do not use spaces or punctuation to separate words.
Although the zero width space (U+200B) can be used as an explicit word delimiter in these scripts,
this practice is not common.
As a result, a lexical resource is needed to correctly identify <a data-link-type="dfn" href="#soft-wrap-opportunity">soft wrap opportunities</a> in such texts. </p>
<p>In several other writing systems, (including Chinese, Japanese, Yi, and sometimes also Korean)
a <a data-link-type="dfn" href="#soft-wrap-opportunity">soft wrap opportunity</a> is based on syllable boundaries, not word boundaries.
In these systems a line can break anywhere <em>except</em> between certain character combinations.
Additionally the level of strictness in these restrictions can vary with the typesetting style.</p>
<p>CSS does not fully define where <a data-link-type="dfn" href="#soft-wrap-opportunity">soft wrap opportunities</a> occur;
however some controls are provided to distinguish common variations. </p>
<div class="note" role="note">
<p>Further information on line breaking conventions can be found in <a data-link-type="biblio" href="#biblio-jlreq">[JLREQ]</a> and <a data-link-type="biblio" href="#biblio-jis4051">[JIS4051]</a> for Japanese, <a data-link-type="biblio" href="#biblio-zhmark">[ZHMARK]</a> for Chinese, and
in <a data-link-type="biblio" href="#biblio-uax14">[UAX14]</a> for all scripts in Unicode. </p>
<p class="feedback issue" id="issue-dbed634a"><a class="self-link" href="#issue-dbed634a"></a>Any guidance for appropriate references here would be
much appreciated. </p>
</div>
<h3 class="heading settled" data-level="5.1" id="line-break-details"><span class="secno">5.1. </span><span class="content"> Line Breaking Details</span><a class="self-link" href="#line-break-details"></a></h3>
<p>When determining <a data-link-type="dfn" href="#line-break">line breaks</a>: </p>
<ul>
<li>Regardless of the <a class="property" data-link-type="propdesc" href="#propdef-white-space">white-space</a> value,
lines always break at each <a data-link-type="dfn" href="#preserved">preserved</a> forced break character:
for all values, line-breaking behavior defined for
the BK, CR, LF, CM, NL, and SG line breaking classes in <a data-link-type="biblio" href="#biblio-uax14">[UAX14]</a> must be honored.
<li>When <a class="property" data-link-type="propdesc" href="#propdef-white-space">white-space</a> allows wrapping,
line breaking behavior defined for the WJ, ZW, and GL line-breaking classes in <a data-link-type="biblio" href="#biblio-uax14">[UAX14]</a> must be honored.
<li>UAs that allow wrapping at punctuation other than spaces should prioritize breakpoints.
For example, if breaks after slashes are given a lower priority than spaces,
the sequence "check /etc" will never break between the "/" and the "e".
As long as care is taken to avoid such awkward breaks, allowing breaks at
appropriate punctuation other than spaces is recommended, as it results
in more even-looking margins, particularly in narrow measures.
The UA may use the width of the containing block, the text’s language,
and other factors in assigning priorities.
<li>Out-of-flow elements do not introduce a <a data-link-type="dfn" href="#forced-line-break">forced line break</a> or <a data-link-type="dfn" href="#soft-wrap-opportunity">soft wrap opportunity</a> in the flow.
<li>The line breaking behavior of a replaced element or other atomic inline
is equivalent to that of the Object Replacement Character (U+FFFC)
and introduces a <a data-link-type="dfn" href="#soft-wrap-opportunity">soft wrap opportunity</a> both before and after itself.
For Web-compatibility, this rule take precedence over <code>WJ</code> and <code>GL</code> handling;
in terms of <a data-link-type="biblio" href="#biblio-uax14">[UAX14]</a>,
this shifts the <code>CB</code> rule (<a href="http://www.unicode.org/reports/tr14/#LB20"><code>LB20</code></a>)
immediately above the <code>WJ</code> and <code>GL</code> rules (<a href="http://www.unicode.org/reports/tr14/#LB11"><code>LB11</code></a>/<a href="http://www.unicode.org/reports/tr14/#LB12"><code>LB12</code></a>).
<li>For <a data-link-type="dfn" href="#soft-wrap-opportunity">soft wrap opportunities</a> created by characters that disappear at the line break (e.g. U+0020 SPACE),
properties on the element containing that character control the line breaking at that opportunity.
For <a data-link-type="dfn" href="#soft-wrap-opportunity">soft wrap opportunities</a> defined by the boundary between two characters,
the properties on the element containing the boundary control breaking.
<li>For <a data-link-type="dfn" href="#soft-wrap-opportunity">soft wrap opportunities</a> before the first or after the last character of a box,
the break occurs immediately before/after the box (at its margin edge)
rather than breaking the box between its content edge and the content.
<li>Line breaking in/around Ruby is defined in <a href="http://www.w3.org/TR/css-ruby-1/#line-breaks">CSS Ruby</a> <a data-link-type="biblio" href="#biblio-css3ruby">[CSS3RUBY]</a>.
</ul>
<h3 class="heading settled" data-level="5.2" id="word-break-property"><span class="secno">5.2. </span><span class="content"> Breaking Rules for Letters: the <a class="property" data-link-type="propdesc" href="#propdef-word-break">word-break</a> property</span><a class="self-link" href="#word-break-property"></a></h3>
<table class="propdef">
<tbody>
<tr>
<th>Name:
<td><dfn class="css" data-dfn-type="property" data-export="" id="propdef-word-break">word-break<a class="self-link" href="#propdef-word-break"></a></dfn>
<tr>
<th><a href="#values">Value</a>:
<td>normal | keep-all | break-all
<tr>
<th>Initial:
<td>normal
<tr>
<th>Applies to:
<td>all elements
<tr>
<th>Inherited:
<td>yes
<tr>
<th>Percentages:
<td>N/A
<tr>
<th>Media:
<td>visual
<tr>
<th>Computed value:
<td>specified value
<tr>
<th>Animatable:
<td>no
<tr>
<th>Canonical order:
<td>N/A
</table>
<p>This property specifies <a data-link-type="dfn" href="#soft-wrap-opportunity">soft wrap opportunities</a> between letters,
i.e. where it is “normal” and permissible to break lines of text.
It does not affect rules governing the <a data-link-type="dfn" href="#soft-wrap-opportunity">soft wrap opportunities</a> created by spaces and punctuation.
(See <a class="property" data-link-type="propdesc" href="#propdef-line-break">line-break</a> for controls affecting punctuation.) </p>
<div class="example" id="example-2d3f06cf">
<a class="self-link" href="#example-2d3f06cf"></a>
<p>For example, in some styles of CJK typesetting, English words are allowed
to break between any two letters, rather than only at spaces or hyphenation points;
this can be enabled with <span class="css">word-break:break-all</span>. </p>
<div class="figure">
<img alt="A snippet of Japanese text with English in it. The word &apos;caption&apos; is broken into &apos;capt&apos; and &apos;ion&apos; across two lines." src="break-all.png">
<p class="caption">An example of English text embedded in Japanese
being broken at an arbitrary point in the word. </p>
</div>
<p>As another example, Korean has two styles of line-breaking:
between any two Korean syllables (<a class="css" data-link-type="propdesc" href="#propdef-word-break">word-break: normal</a>)
or, like English, mainly at spaces (<a class="css" data-link-type="propdesc" href="#propdef-word-break">word-break: keep-all</a>). </p>
<pre>각 줄의 마지막에 한글이 올 때 줄 나눔 기 /* break between syllables */준을 “글자” 또는 “어절” 단위로 한다.</pre>
<pre>각 줄의 마지막에 한글이 올 때 줄 나눔 /* break only at spaces */기준을 “글자” 또는 “어절” 단위로 한다.</pre>
</div>
<p class="note" role="note"> To enable additional break opportunities only in the case of overflow,
see <a class="property" data-link-type="propdesc" href="#propdef-overflow-wrap">overflow-wrap</a>. </p>
<p>Values have the following meanings:</p>
<dl>
<dt><dfn class="css" data-dfn-for="word-break" data-dfn-type="value" data-export="" id="valdef-word-break-normal">normal<a class="self-link" href="#valdef-word-break-normal"></a></dfn>
<dd>Words break according to their customary rules,
as described <a href="#line-breaking">above</a>.
Korean, which commonly exhibits two different behaviors,
allows breaks between any two consecutive Hangul/Hanja.
<dt><dfn class=&qu 6909 ot;css" data-dfn-for="word-break" data-dfn-type="value" data-export="" id="valdef-word-break-break-all">break-all<a class="self-link" href="#valdef-word-break-break-all"></a></dfn>
<dd>Breaking is allowed within “words”:
in addition to <a class="css" data-link-type="maybe" href="#valdef-word-break-normal">normal</a> <a data-link-type="dfn" href="#soft-wrap-opportunity">soft wrap opportunities</a>,
lines may break between any two <a data-link-type="dfn" href="#typographic-letter-unit">typographic letter units</a> (except where forbidden by the <a class="property" data-link-type="propdesc" href="#propdef-line-break">line-break</a> property).
Hyphenation is not applied. This option is used mostly in a context where
the text consists predominantly of CJK characters with only short non-CJK excerpts,
and it is desired that the text be better distributed on each line.
<dt><dfn class="css" data-dfn-for="word-break" data-dfn-type="value" data-export="" id="valdef-word-break-keep-all">keep-all<a class="self-link" href="#valdef-word-break-keep-all"></a></dfn>
<dd>
Breaking is forbidden within “words”:
implicit <a data-link-type="dfn" href="#soft-wrap-opportunity">soft wrap opportunities</a> between <a data-link-type="dfn" href="#typographic-letter-unit">typographic letter units</a> are suppressed,
i.e. breaks are prohibited between pairs of letters
(regardless of <a class="property" data-link-type="propdesc" href="#propdef-line-break">line-break</a> settings)
except where opportunities exist due to dictionary-based breaking.
Otherwise this option is equivalent to <a class="css" data-link-type="maybe" href="#valdef-word-break-normal">normal</a>.
In this style, sequences of CJK characters do not break.
<p class="note" role="note">This is the other common behavior for Korean (which uses spaces between words),
and is also useful for mixed-script text where CJK snippets are mixed
into another language that uses spaces for separation.</p>
</dl>
<p>Symbols that line-break the same way as letters of a particular category
are affected the same way as those letters. </p>
<div class="example" id="example-b3227dab">
<a class="self-link" href="#example-b3227dab"></a>
<p>Here’s a mixed-script sample text: </p>
<pre>这是一些汉字, and some Latin, و کمی نوشتن عربی, และตัวอย่างการเขียนภาษาไทย.</pre>
<p>The break-points are determined as follows (indicated by ‘·’): </p>
<dl>
<dt><a class="css" data-link-type="propdesc" href="#propdef-word-break">word-break: normal</a>
<dd>
<pre>这·是·一·些·汉·字,·and·some·Latin,·و·کمی·نوشتن·عربی,·และ·ตัวอย่าง·การเขียน·ภาษาไทย.</pre>
<dt><a class="css" data-link-type="propdesc" href="#propdef-word-break">word-break: break-all</a>
<dd>
<pre>这·是·一·些·汉·字,·a·n·d·s·o·m·e·L·a·t·i·n,·و·ﮐ·ﻤ·ﻰ·ﻧ·ﻮ·ﺷ·ﺘ·ﻦ·ﻋ·ﺮ·ﺑ·ﻰ,·แ·ล·ะ·ตั·ว·อ·ย่·า·ง·ก·า·ร·เ·ขี·ย·น·ภ·า·ษ·า·ไ·ท·ย.</pre>
<dt><a class="css" data-link-type="propdesc" href="#propdef-word-break">word-break: keep-all</a>
<dd>
<pre>这是一些汉字,·and·some·Latin,·و·کمی·نوشتن·عربی,·แและ·ตัวอย่าง·การเขียน·ภาษาไทย.</pre>
</dl>
</div>
<p>When shaping scripts such as Arabic are allowed to break within words
due to <a class="css" data-link-type="maybe" href="#valdef-word-break-break-all">break-all</a>, the characters must still be shaped as if the
word were not broken.</p>
<h3 class="heading settled" data-level="5.3" id="line-break-property"><span class="secno">5.3. </span><span class="content"> Breaking Rules for Punctuation: the <a class="property" data-link-type="propdesc" href="#propdef-line-break">line-break</a> property</span><a class="self-link" href="#line-break-property"></a></h3>
<table class="propdef">