This feature is well established and works across many devices and browser versions. It’s been available across browsers since July 2020.
The line-break CSS property sets how to break lines of Chinese, Japanese, or Korean (CJK) text when working with punctuation and symbols.
line-break: auto;
line-break: anywhere;
line-break: normal;
line-break: loose;
<section id="default-example">
<p id="example-element">
この喫茶店は、いつでもコーヒーの香りを漂わせています。<br />彼女はこの喫茶店で働いて、着々と実力をつけていきました。<br />今では知る人ぞ知る、名人です。
</p>
</section>
#example-element {
font-family: "Yu Gothic", YuGothic, Meiryo, "MS ゴシック", sans-serif;
border: 2px dashed #999999;
text-align: left;
width: 240px;
font-size: 16px;
}
/* Keyword values */ line-break: auto; line-break: loose; line-break: normal; line-break: strict; line-break: anywhere; /* Global values */ line-break: inherit; line-break: initial; line-break: revert; line-break: revert-layer; line-break: unset;
autoBreak text using the default line break rule.
looseBreak text using the least restrictive line break rule. Typically used for short lines, such as in newspapers.
normalBreak text using the most common line break rule.
strictBreak text using the most stringent line break rule.
anywhereThere is a soft wrap opportunity around every typographic character unit, including around any punctuation character or preserved white spaces, or in the middle of words, disregarding any prohibition against line breaks, even those introduced by characters with the GL, WJ, or ZWJ character class or mandated by the word-break property. The different wrapping opportunities must not be prioritized. Hyphenation is not applied.
| Initial value | auto |
|---|---|
| Applies to | all elements |
| Inherited | yes |
| Computed value | as specified |
| Animation type | discrete |
line-break =
auto |
loose |
normal |
strict |
anywhere
See whether the text is wrapped before "々", "ぁ" and "。".
<div lang="ja">
<p class="wrap-box auto">
auto:<br />そこは湖のほとりで木々が輝いていた。<br />その景色に、美しいなぁと思わずつぶやいた。
</p>
<p class="wrap-box loose">
loose:<br />そこは湖のほとりで木々が輝いていた。<br />その景色に、美しいなぁと思わずつぶやいた。
</p>
<p class="wrap-box normal">
normal:<br />そこは湖のほとりで木々が輝いていた。<br />その景色に、美しいなぁと思わずつぶやいた。
</p>
<p class="wrap-box strict">
strict:<br />そこは湖のほとりで木々が輝いていた。<br />その景色に、美しいなぁと思わずつぶやいた。
</p>
<p class="wrap-box anywhere">
anywhere:<br />そこは湖のほとりで木々が輝いていた。<br />その景色に、美しいなぁと思わずつぶやいた。
</p>
</div>
.wrap-box {
width: 10em;
margin: 0.5em;
white-space: normal;
vertical-align: top;
display: inline-block;
}
.auto {
line-break: auto;
}
.loose {
line-break: loose;
}
.normal {
line-break: normal;
}
.strict {
line-break: strict;
}
.anywhere {
line-break: anywhere;
}
| Specification |
|---|
| CSS Text Module Level 3> # line-break-property> |
| Desktop | Mobile | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Chrome | Edge | Firefox | Opera | Safari | Chrome Android | Firefox for Android | Opera Android | Safari on IOS | Samsung Internet | WebView Android | WebView on iOS | |
line-break |
581 | 14 | 69 | 4515 | 1132–3 | 5818 | 79 | 4314 | 111 | 7.01.0 | 584.4 | 111 |
anywhere |
83 | 83 | 69 | 69 | 13 | 83 | 79 | 59 | 13 | 13.0 | 83 | 13 |
auto |
25 | 79 | 69 | 15 | 7 | 25 | 79 | 14 | 7 | 1.5 | 4.4 | 7 |
loose |
25 | 79 | 69 | 15 | 8 | 25 | 79 | 14 | 8 | 1.5 | 4.4 | 8 |
normal |
1 | 79 | 69 | 15 | 2 | 18 | 79 | 14 | 1 | 1.0 | 4.4 | 1 |
strict |
25 | 79 | 69 | 15 | 8 | 25 | 79 | 14 | 8 | 1.5 | 4.4 | 8 |
© 2005–2025 MDN contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/CSS/line-break