Working Draft · css-text

CSS Text

36 properties defined by this specification, 26 of them known to at least one browser (the others are badged Not in any browser yet).

Each feature in detail

hanging-punctuation

Property Limited availability Modern CSS: Hanging punctuation

MDN The hanging-punctuation CSS property specifies whether a punctuation mark should hang at the start or end of a line of text. Hanging punctuation may be placed outside the line box.

Live preview Example from MDN
p {
  width: 15em;
  border: 1px solid #cccccc;
  font-size: 2rem;
  font-style: italic;
  margin: 1em;
}

p.hanging {
  hanging-punctuation: first last;
}

p.right {
  text-align: right;
}

Syntax

none | [ first || [ force-end | allow-end ] || last ]

Formal grammar from the specification, as webref extracts it: the latest level's definition, sometimes ahead of what browsers implement.

Definition

Initial
none
Applies to
text
Inherited
yes
Percentages
n/a
Computed value
specified keyword(s)
Canonical order
per grammar
Animation type
discrete

Browser support

First browser version supporting hanging-punctuation
Chrome No
Edge No
Firefox No
Safari 26.5
Chrome Android No
Safari iOS 26.5

First version with support, from MDN browser-compat-data.

hyphenate-character

Property Baseline: widely availablesince March 2026 Modern CSS: Hyphenate character

MDN The hyphenate-character CSS property sets the character (or string) used at the end of a line before a hyphenation break.

Live preview Example from MDN
#example-element {
  border: 2px dashed #999999;
  font-size: 1.5rem;
  text-align: left;
  width: 7rem;
  hyphens: auto;
}

Syntax

auto | <string>

Formal grammar from the specification, as webref extracts it: the latest level's definition, sometimes ahead of what browsers implement.

Definition

Initial
auto
Applies to
text
Inherited
yes
Percentages
n/a
Computed value
specified keyword
Canonical order
per grammar
Animation type
discrete

Browser support

First browser version supporting hyphenate-character
Chrome 106
Edge 106
Firefox 98
Safari 17
Chrome Android 106
Safari iOS 17

First version with support, from MDN browser-compat-data.

hyphenate-limit-chars

Property Limited availability Modern CSS: Hyphenate limit chars

MDN The hyphenate-limit-chars CSS property specifies the minimum word length to allow hyphenation of words as well as the minimum number of characters before and after the hyphen.

Live preview Example from MDN
.container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}

p {
  margin: 1rem;
  width: 120px;
  border: 2px dashed #999999;
  font-size: 1.5rem;
  hyphens: auto;
}

#ex2 {
  hyphenate-limit-chars: 14;
}

#ex3 {
  hyphenate-limit-chars: 5 9 2;
}

#ex4 {
  hyphenate-limit-chars: 5 2 7;
}

Syntax

[ auto | <integer [0,∞]> ]{1,3}

Formal grammar from the specification, as webref extracts it: the latest level's definition, sometimes ahead of what browsers implement.

Definition

Initial
auto
Applies to
text
Inherited
yes
Percentages
n/a
Computed value
three values, each either the auto keyword or an integer
Canonical order
per grammar
Animation type
by computed value type

Browser support

First browser version supporting hyphenate-limit-chars
Chrome 109
Edge 109
Firefox 137
Safari Preview
Chrome Android 109
Safari iOS No

First version with support, from MDN browser-compat-data.

hyphenate-limit-last

Property Not in any browser yet

No prose in the spec's definition and no MDN page yet: the spec link below is the only description.

Syntax

none | always | column | page | spread

Formal grammar from the specification, as webref extracts it: the latest level's definition, sometimes ahead of what browsers implement.

Definition

Initial
none
Applies to
block containers
Inherited
yes
Percentages
n/a
Computed value
specified keyword
Canonical order
per grammar
Animation type
discrete

hyphenate-limit-lines

Property Experimental

No prose in the spec's definition and no MDN page yet: the spec link below is the only description.

Syntax

no-limit | <integer [0,∞]>

Formal grammar from the specification, as webref extracts it: the latest level's definition, sometimes ahead of what browsers implement.

Definition

Initial
no-limit
Applies to
block containers
Inherited
yes
Percentages
n/a
Computed value
specified keyword or integer
Canonical order
per grammar
Animation type
by computed value type

Browser support

First browser version supporting hyphenate-limit-lines
Chrome No
Edge No
Firefox No
Safari Preview
Chrome Android No
Safari iOS No

First version with support, from MDN browser-compat-data.

hyphenate-limit-zone

Property Not in any browser yet

No prose in the spec's definition and no MDN page yet: the spec link below is the only description.

Syntax

<length-percentage>

Formal grammar from the specification, as webref extracts it: the latest level's definition, sometimes ahead of what browsers implement.

Definition

Initial
0
Applies to
block containers
Inherited
yes
Percentages
refers to length of the line box
Computed value
computed <length-percentage> value
Canonical order
per grammar
Animation type
by computed value type

hyphens

Property Baseline: widely availablesince March 2026 Modern CSS: Hyphenation

MDN The hyphens CSS property specifies how words should be hyphenated when text wraps across multiple lines.

Live preview Example from MDN
#example-element {
  border: 2px dashed #999999;
  font-size: 1.5rem;
  text-align: left;
  width: 7rem;
}

Syntax

none | manual | auto

Formal grammar from the specification, as webref extracts it: the latest level's definition, sometimes ahead of what browsers implement.

Definition

Initial
manual
Applies to
text
Inherited
yes
Percentages
n/a
Computed value
specified keyword
Canonical order
n/a
Animation type
discrete

Browser support

First browser version supporting hyphens
Chrome 55
Edge 79
Firefox 43
Safari 17
Chrome Android 55
Safari iOS 17

First version with support, from MDN browser-compat-data.

letter-spacing

Property Baseline: widely availablesince January 2018

MDN The letter-spacing CSS property sets the spacing between text characters. This value is added to the natural spacing between characters while rendering the text. Positive values of letter-spacing spread characters further apart, while negative values of letter-spacing bring characters closer together.

Live preview Example from MDN
@font-face {
  src: url("https://developer.mozilla.org/shared-assets/fonts/variable-fonts/AmstelvarAlpha-VF.woff2");
  font-family: "Amstelvar";
  font-style: normal;
}

section {
  font-size: 1.2em;
  font-family: "Amstelvar", serif;
}

Syntax

normal | <length-percentage>

Formal grammar from the specification, as webref extracts it: the latest level's definition, sometimes ahead of what browsers implement.

Definition

Initial
normal
Applies to
inline boxes and text
Inherited
yes
Percentages
relative to used font-size
Computed value
an absolute length and/or a percentage
Canonical order
n/a
Animation type
by computed value type

Browser support

First browser version supporting letter-spacing
Chrome 1
Edge 12
Firefox 1
Safari 1
Chrome Android 18
Safari iOS 1

First version with support, from MDN browser-compat-data.

line-break

Property Baseline: widely availablesince January 2023

MDN The line-break CSS property sets how to break lines of Chinese, Japanese, or Korean (CJK) text when working with punctuation and symbols.

Live preview Example from MDN
#example-element {
  font-family: "Yu Gothic", "YuGothic", "Meiryo", "MS ゴシック", sans-serif;
  border: 2px dashed #999999;
  text-align: left;
  width: 240px;
  font-size: 16px;
}

Syntax

auto | loose | normal | strict | anywhere

Formal grammar from the specification, as webref extracts it: the latest level's definition, sometimes ahead of what browsers implement.

Definition

Initial
auto
Applies to
text
Inherited
yes
Percentages
n/a
Computed value
specified keyword
Canonical order
n/a
Animation type
discrete

Browser support

First browser version supporting line-break
Chrome 58
Edge 14
Firefox 69
Safari 11
Chrome Android 58
Safari iOS 11

First version with support, from MDN browser-compat-data.

line-padding

Property Not in any browser yet

No prose in the spec's definition and no MDN page yet: the spec link below is the only description.

Syntax

<length>

Formal grammar from the specification, as webref extracts it: the latest level's definition, sometimes ahead of what browsers implement.

Definition

Initial
0
Applies to
inline boxes
Inherited
yes
Percentages
N/A
Computed value
absolute length
Canonical order
per grammar
Animation type
by computed value type

overflow-wrap

Property Baseline: widely availablesince April 2021

MDN The overflow-wrap CSS property applies to text, setting whether the browser should insert line breaks within an otherwise unbreakable string to prevent text from overflowing its line box.

Live preview Example from MDN
.example-container {
  background-color: rgb(255 0 200 / 0.2);
  border: 3px solid rebeccapurple;
  padding: 0.75em;
  width: min-content;
  max-width: 11em;
  height: 200px;
}

Syntax

normal | break-word | anywhere

Formal grammar from the specification, as webref extracts it: the latest level's definition, sometimes ahead of what browsers implement.

Definition

Initial
normal
Applies to
text
Inherited
yes
Percentages
n/a
Computed value
specified keyword
Canonical order
n/a
Animation type
discrete

Browser support

First browser version supporting overflow-wrap
Chrome 23
Edge 18
Firefox 49
Safari 7
Chrome Android 25
Safari iOS 7

First version with support, from MDN browser-compat-data.

tab-size

Property Baseline: widely availablesince February 2024

MDN The tab-size CSS property is used to customize the width of tab characters (U+0009).

Live preview Example from MDN
#example-element {
  border: 1px solid;
}

Syntax

<number [0,∞]> | <length [0,∞]>

Formal grammar from the specification, as webref extracts it: the latest level's definition, sometimes ahead of what browsers implement.

Definition

Initial
8
Applies to
text
Inherited
yes
Percentages
n/a
Computed value
the specified number or absolute length
Canonical order
n/a
Animation type
by computed value type

Browser support

First browser version supporting tab-size
Chrome 21
Edge 79
Firefox 91
Safari 7
Chrome Android 25
Safari iOS 7

First version with support, from MDN browser-compat-data.

text-align

Property Baseline: widely availablesince January 2018

MDN The text-align CSS property sets the horizontal alignment of the inline-level content inside a block element or table-cell box. This means it works like vertical-align but in the horizontal direction.

Live preview Example from MDN
section {
  font-size: 1.5em;
}

#default-example > div {
  width: 250px;
}

Syntax

start | end | left | right | center | <string> | justify | match-parent | justify-all

Formal grammar from the specification, as webref extracts it: the latest level's definition, sometimes ahead of what browsers implement.

Definition

Initial
start
Applies to
block containers
Inherited
yes
Percentages
see individual properties
Computed value
see individual properties
Canonical order
n/a
Animation type
discrete
Longhands
text-align-all, text-align-last

Browser support

First browser version supporting text-align
Chrome 1
Edge 12
Firefox 1
Safari 1
Chrome Android 18
Safari iOS 1

First version with support, from MDN browser-compat-data.

text-align-all

Property Not in any browser yet

No prose in the spec's definition and no MDN page yet: the spec link below is the only description.

Syntax

start | end | left | right | center | <string> | justify | match-parent

Formal grammar from the specification, as webref extracts it: the latest level's definition, sometimes ahead of what browsers implement.

Definition

Initial
start
Applies to
block containers
Inherited
yes
Percentages
n/a
Computed value
keyword as specified, except for match-parent which computes as defined above
Canonical order
n/a
Animation type
discrete

text-align-last

Property Baseline: widely availablesince March 2025

MDN The text-align-last CSS property sets how the last line of a block or a line, right before a forced line break, is aligned.

Live preview Example from MDN
section {
  font-size: 1.5em;
}

#default-example > div {
  width: 250px;
}

#example-element {
  text-align: justify;
}

Syntax

auto | start | end | left | right | center | justify | match-parent

Formal grammar from the specification, as webref extracts it: the latest level's definition, sometimes ahead of what browsers implement.

Definition

Initial
auto
Applies to
block containers
Inherited
yes
Percentages
n/a
Computed value
keyword as specified, except for match-parent which computes as defined above
Canonical order
n/a
Animation type
discrete

Browser support

First browser version supporting text-align-last
Chrome 47
Edge 12
Firefox 49
Safari 16
Chrome Android 47
Safari iOS 16

First version with support, from MDN browser-compat-data.

text-autospace

Property Limited availability Modern CSS: text-autospace

MDN The text-autospace CSS property allows you to specify the space applied between Chinese/Japanese/Korean (CJK) and non-CJK characters.

Live preview Example from MDN
#example-element {
  font: 2rem sans-serif;
}

p {
  margin: 0;
}

Syntax

normal | <autospace> | auto

Formal grammar from the specification, as webref extracts it: the latest level's definition, sometimes ahead of what browsers implement.

Definition

Initial
normal
Applies to
text
Inherited
yes
Percentages
N/A
Computed value
specified keyword(s)
Canonical order
per grammar
Animation type
discrete

Browser support

First browser version supporting text-autospace
Chrome 140
Edge 140
Firefox 145
Safari 18.4
Chrome Android 140
Safari iOS 18.4

First version with support, from MDN browser-compat-data.

text-fit

Property Limited availability Experimental Modern CSS: text-fit

MDN The text-fit CSS property can be used to scale the rendered font size of text nodes (and other inline content) so that they fit exactly within the inline dimension of their containing boxes, optionally limited by a maximum or minimum scaling factor.

Live preview Example from MDN
* {
  box-sizing: border-box;
}

html {
  font-family: sans-serif;
  background-color: white;
}

div {
  margin: 0 auto;
  background-color: coral;
}

input {
  width: 99%;
}

div {
  padding: 20px;
}

h1 {
  text-fit: grow;
}

h2 {
  white-space: nowrap;
  text-fit: shrink;
}

Syntax

[ none | grow | shrink ] [consistent | per-line | per-line-all]? <percentage>?

Formal grammar from the specification, as webref extracts it: the latest level's definition, sometimes ahead of what browsers implement.

Definition

Initial
none
Applies to
block containers
Inherited
yes
Percentages
N/A
Computed value
specified keywords or computed <percentage> value
Canonical order
per grammar
Animation type
discrete

Browser support

First browser version supporting text-fit
Chrome 150
Edge 150
Firefox No
Safari No
Chrome Android 150
Safari iOS No

First version with support, from MDN browser-compat-data.

text-group-align

Property Not in any browser yet

No prose in the spec's definition and no MDN page yet: the spec link below is the only description.

Syntax

none | start | end | left | right | center

Formal grammar from the specification, as webref extracts it: the latest level's definition, sometimes ahead of what browsers implement.

Definition

Initial
none
Applies to
block containers
Inherited
no
Percentages
N/A
Computed value
specified keyword
Canonical order
per grammar
Animation type
discrete

text-indent

Property Baseline: widely availablesince January 2018 Modern CSS: text-indent: each-lineModern CSS: text-indent: hanging

MDN The text-indent CSS property sets the length of empty space (indentation) that is put before lines of text in a block.

Live preview Example from MDN
section {
  font-size: 1.25em;
  background-color: darkslateblue;
  align-items: start;
}

#example-element {
  text-align: left;
  margin-left: 3em;
  background-color: slateblue;
  color: white;
}

Syntax

[ <length-percentage> ] && hanging? && each-line?

Formal grammar from the specification, as webref extracts it: the latest level's definition, sometimes ahead of what browsers implement.

Definition

Initial
0
Applies to
block containers
Inherited
yes
Percentages
refers to block container’s own inline-axis inner size
Computed value
computed <length-percentage> value, plus any specified keywords
Canonical order
per grammar
Animation type
by computed value type

Browser support

First browser version supporting text-indent
Chrome 1
Edge 12
Firefox 1
Safari 1
Chrome Android 18
Safari iOS 1

First version with support, from MDN browser-compat-data.

text-justify

Property Limited availability Modern CSS: text-justify

MDN The text-justify CSS property sets what type of justification should be applied to text when text-align: justify; is set on an element.

Live preview Example from MDN
p {
  font-size: 1.5em;
  border: 1px solid black;
  padding: 10px;
  width: 95%;
  margin: 10px auto;
  text-align: justify;
}

.none {
  text-justify: none;
}

.auto {
  text-justify: auto;
}

.dist {
  text-justify: distribute;
}

.word {
  text-justify: inter-word;
}

.char {
  text-justify: inter-character;
}

Syntax

[ auto | none | inter-word | inter-character | ruby ] || no-compress

Formal grammar from the specification, as webref extracts it: the latest level's definition, sometimes ahead of what browsers implement.

Definition

Initial
auto
Applies to
text
Inherited
yes
Percentages
n/a
Computed value
specified keyword (except for the distribute legacy value)
Canonical order
n/a
Animation type
discrete

Browser support

First browser version supporting text-justify
Chrome 145
Edge 145
Firefox 55
Safari No
Chrome Android 145
Safari iOS No

First version with support, from MDN browser-compat-data.

text-spacing

Property Not in any browser yet

No prose in the spec's definition and no MDN page yet: the spec link below is the only description.

Syntax

none | auto | <spacing-trim> || <autospace>

Formal grammar from the specification, as webref extracts it: the latest level's definition, sometimes ahead of what browsers implement.

Definition

Initial
see individual properties
Applies to
text
Inherited
yes
Percentages
N/A
Computed value
specified keyword(s)
Canonical order
per grammar
Animation type
discrete
Longhands
text-spacing-trim, text-autospace

text-spacing-trim

Property Limited availability Experimental Modern CSS: text-spacing-trim

MDN The text-spacing-trim CSS property controls the internal spacing set on Chinese/Japanese/Korean (CJK) punctuation characters between adjacent characters (kerning) and at the start or end of text lines.

Live preview Example from MDN
main {
  font-family:
    "Yu Gothic", "YuGothic", "Noto Sans JP", "Hiragino Sans",
    "Hiragino Kaku Gothic ProN", sans-serif;
  display: grid;
  gap: 0.5em;
  grid-template-columns: 1fr 1fr;
  width: 70%;
  margin: 0 auto;
}
h2 {
  font-size: 80%;
  margin: 0;
}
p {
  font-size: 20px;
  border: 1px solid blue;
  margin: 0;
}
#normal {
  text-spacing-trim: normal;
  grid-column: 1;
  grid-row: 1;
}
#space-all {
  text-spacing-trim: space-all;
  grid-column: 2;
  grid-row: 1;
}
#space-first {
  text-spacing-trim: space-first;
  grid-column: 1;
  grid-row: 2;
}
#trim-start {
  text-spacing-trim: trim-start;
  grid-column: 2;
  grid-row: 2;
}

Syntax

<spacing-trim> | auto

Formal grammar from the specification, as webref extracts it: the latest level's definition, sometimes ahead of what browsers implement.

Definition

Initial
normal
Applies to
text
Inherited
yes
Percentages
N/A
Computed value
specified keyword(s)
Canonical order
per grammar
Animation type
discrete

Browser support

First browser version supporting text-spacing-trim
Chrome 123
Edge 123
Firefox No
Safari No
Chrome Android 123
Safari iOS No

First version with support, from MDN browser-compat-data.

text-transform

Property Baseline: widely availablesince January 2018 Modern CSS: MathML

MDN The text-transform CSS property specifies how to capitalize an element's text. It can be used to make text appear in all-uppercase or all-lowercase, or with each word capitalized. It also can help improve legibility for ruby.

Live preview Example from MDN
#example-element {
  font-size: 1.2em;
}

Syntax

none | [capitalize | uppercase | lowercase ] || full-width || full-size-kana | math-auto

Formal grammar from the specification, as webref extracts it: the latest level's definition, sometimes ahead of what browsers implement.

Definition

Initial
none
Applies to
text
Inherited
yes
Percentages
n/a
Computed value
specified keyword
Canonical order
n/a
Animation type
discrete

Browser support

First browser version supporting text-transform
Chrome 1
Edge 12
Firefox 1
Safari 1
Chrome Android 18
Safari iOS 1

First version with support, from MDN browser-compat-data.

text-wrap

Property Baseline: newly availablesince October 2024 Modern CSS: text-wrap: prettyModern CSS: text-wrapModern CSS: text-wrap: balance

MDN The text-wrap CSS shorthand property controls how text inside an element is wrapped. The different values provide:

Live preview Example from MDN
.whole-content-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

#example-element {
  border: 1px solid #c5c5c5;
  width: 250px;
}

Syntax

<'text-wrap-mode'> || <'text-wrap-style'>

Formal grammar from the specification, as webref extracts it: the latest level's definition, sometimes ahead of what browsers implement.

Definition

Initial
wrap
Applies to
see individual properties
Inherited
see individual properties
Percentages
see individual properties
Computed value
see individual properties
Canonical order
per grammar
Animation type
see individual properties
Longhands
text-wrap-mode, text-wrap-style

Browser support

First browser version supporting text-wrap
Chrome 114
Edge 114
Firefox 121
Safari 17.4
Chrome Android 114
Safari iOS 17.4

First version with support, from MDN browser-compat-data.

text-wrap-mode

Property Baseline: newly availablesince October 2024 Modern CSS: text-wrap

MDN The text-wrap-mode CSS property controls whether the text inside an element is wrapped.

Live preview Example from MDN
.whole-content-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

#example-element {
  border: 1px solid #c5c5c5;
  width: 250px;
}

Syntax

wrap | nowrap

Formal grammar from the specification, as webref extracts it: the latest level's definition, sometimes ahead of what browsers implement.

Definition

Initial
wrap
Applies to
text
Inherited
yes
Percentages
n/a
Computed value
specified keyword
Canonical order
per grammar
Animation type
discrete

Browser support

First browser version supporting text-wrap-mode
Chrome 130
Edge 130
Firefox 124
Safari 17.4
Chrome Android 130
Safari iOS 17.4

First version with support, from MDN browser-compat-data.

text-wrap-style

Property Baseline: newly availablesince October 2024 Modern CSS: text-wrap: prettyModern CSS: text-wrapModern CSS: text-wrap: balance

MDN The text-wrap-style CSS property controls how text inside an element is wrapped, providing alternate ways of determining where to create line breaks in order to fit the content within a block element.

Live preview Example from MDN
.whole-content-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

#example-element {
  border: 1px solid #c5c5c5;
  width: 250px;
}

Syntax

auto | balance | stable | pretty | avoid-short-last-line

Formal grammar from the specification, as webref extracts it: the latest level's definition, sometimes ahead of what browsers implement.

Definition

Initial
auto
Applies to
block containers hat establish an inline formatting context
Inherited
yes
Percentages
n/a
Computed value
specified keyword
Canonical order
per grammar
Animation type
discrete

Browser support

First browser version supporting text-wrap-style
Chrome 130
Edge 130
Firefox 124
Safari 17.5
Chrome Android 130
Safari iOS 17.5

First version with support, from MDN browser-compat-data.

white-space

Property Baseline: widely availablesince January 2018

MDN The white-space CSS shorthand property sets how white space inside an element is handled.

Live preview Example from MDN
#example-element {
  width: 16rem;
}

#example-element p {
  border: 1px solid #c5c5c5;
  padding: 0.75rem;
  text-align: left;
}

Syntax

normal | pre | pre-wrap | pre-line | <'white-space-collapse'> || <'text-wrap-mode'> || <'white-space-trim'>

Formal grammar from the specification, as webref extracts it: the latest level's definition, sometimes ahead of what browsers implement.

Definition

Initial
normal
Applies to
text
Inherited
see individual properties
Percentages
n/a
Computed value
specified keyword
Canonical order
n/a
Animation type
discrete
Longhands
white-space-collapse, text-wrap-mode

Browser support

First browser version supporting white-space
Chrome 1
Edge 12
Firefox 1
Safari 1
Chrome Android 18
Safari iOS 1

First version with support, from MDN browser-compat-data.

white-space-collapse

Property Baseline: widely availablesince September 2026 Modern CSS: white-space-collapse

MDN The white-space-collapse CSS property controls how white space inside an element is collapsed.

Syntax

collapse | discard | preserve | preserve-breaks | preserve-spaces | break-spaces

Formal grammar from the specification, as webref extracts it: the latest level's definition, sometimes ahead of what browsers implement.

Definition

Initial
collapse
Applies to
text
Inherited
yes
Percentages
n/a
Computed value
specified keyword
Canonical order
per grammar
Animation type
discrete

Browser support

First browser version supporting white-space-collapse
Chrome 114
Edge 114
Firefox 124
Safari 17.4
Chrome Android 114
Safari iOS 17.4

First version with support, from MDN browser-compat-data.

white-space-trim

Property Experimental

No prose in the spec's definition and no MDN page yet: the spec link below is the only description.

Syntax

none | discard-before || discard-after || discard-inner

Formal grammar from the specification, as webref extracts it: the latest level's definition, sometimes ahead of what browsers implement.

Definition

Initial
none
Applies to
inline boxes and block containers
Inherited
no
Percentages
n/a
Computed value
specified keyword(s)
Canonical order
per grammar
Animation type
discrete

Browser support

First browser version supporting white-space-trim
Chrome No
Edge No
Firefox No
Safari Preview
Chrome Android No
Safari iOS No

First version with support, from MDN browser-compat-data.

word-break

Property Baseline: widely availablesince March 2018 Modern CSS: word-break: auto-phrase

MDN The word-break CSS property sets whether line breaks appear wherever the text would otherwise overflow its content box.

Live preview Example from MDN
#example-element {
  width: 80%;
  padding: 20px;
  text-align: start;
  border: solid 1px darkgray;
}

Syntax

normal | break-all | keep-all | manual | auto-phrase | break-word

Formal grammar from the specification, as webref extracts it: the latest level's definition, sometimes ahead of what browsers implement.

Definition

Initial
normal
Applies to
text
Inherited
yes
Percentages
n/a
Computed value
specified keyword
Canonical order
n/a
Animation type
discrete

Browser support

First browser version supporting word-break
Chrome 1
Edge 12
Firefox 15
Safari 3
Chrome Android 18
Safari iOS 2

First version with support, from MDN browser-compat-data.

word-space-transform

Property Not in any browser yet

No prose in the spec's definition and no MDN page yet: the spec link below is the only description.

Syntax

none | [ space | ideographic-space ] && auto-phrase?

Formal grammar from the specification, as webref extracts it: the latest level's definition, sometimes ahead of what browsers implement.

Definition

Initial
none
Applies to
text
Inherited
yes
Percentages
N/A
Computed value
as specified
Canonical order
per grammar
Animation type
discrete

word-spacing

Property Baseline: widely availablesince January 2018

MDN The word-spacing CSS property sets the spacing between words and between tags.

Live preview Example from MDN
@font-face {
  src: url("https://developer.mozilla.org/shared-assets/fonts/variable-fonts/AmstelvarAlpha-VF.woff2");
  font-family: "Amstelvar";
  font-style: normal;
}

section {
  font-size: 1.2em;
  font-family: "Amstelvar", serif;
}

Syntax

normal | <length-percentage>

Formal grammar from the specification, as webref extracts it: the latest level's definition, sometimes ahead of what browsers implement.

Definition

Initial
normal
Applies to
text
Inherited
yes
Percentages
relative to used font-size
Computed value
an absolute length and/or a percentage
Canonical order
n/a
Animation type
by computed value type

Browser support

First browser version supporting word-spacing
Chrome 1
Edge 12
Firefox 1
Safari 1
Chrome Android 18
Safari iOS 1

First version with support, from MDN browser-compat-data.

word-wrap

Property Not in any browser yet

No prose in the spec's definition and no MDN page yet: the spec link below is the only description.

Syntax

normal | break-word | anywhere

Formal grammar from the specification, as webref extracts it: the latest level's definition, sometimes ahead of what browsers implement.

wrap-after

Property Not in any browser yet

No prose in the spec's definition and no MDN page yet: the spec link below is the only description.

Syntax

auto | avoid | avoid-line | avoid-flex | line | flex

Formal grammar from the specification, as webref extracts it: the latest level's definition, sometimes ahead of what browsers implement.

Definition

Initial
auto
Applies to
inline-level boxes and flex items
Inherited
no
Percentages
n/a
Computed value
specified keyword
Canonical order
per grammar
Animation type
discrete

wrap-before

Property Not in any browser yet

No prose in the spec's definition and no MDN page yet: the spec link below is the only description.

Syntax

auto | avoid | avoid-line | avoid-flex | line | flex

Formal grammar from the specification, as webref extracts it: the latest level's definition, sometimes ahead of what browsers implement.

Definition

Initial
auto
Applies to
inline-level boxes and flex items
Inherited
no
Percentages
n/a
Computed value
specified keyword
Canonical order
per grammar
Animation type
discrete

wrap-inside

Property Experimental

No prose in the spec's definition and no MDN page yet: the spec link below is the only description.

Syntax

auto | avoid

Formal grammar from the specification, as webref extracts it: the latest level's definition, sometimes ahead of what browsers implement.

Definition

Initial
auto
Applies to
inline boxes
Inherited
no
Percentages
n/a
Computed value
specified keyword
Canonical order
per grammar
Animation type
discrete

Browser support

First browser version supporting wrap-inside
Chrome No
Edge No
Firefox No
Safari Preview
Chrome Android No
Safari iOS No

First version with support, from MDN browser-compat-data.