CSS - line-break

The line-break CSS property is used to specify how (or if) to break lines.

Syntax  

CSS
/* Keyword values */
line-break: auto;
line-break: loose;
line-break: normal;
line-break: strict;

/* Global values */
line-break: inherit;
line-break: initial;
line-break: unset;

Values

auto
break text using  the default line break rule.
loose
break text using the line break rule that the line is shorter like a newspaper.
normal
break text using the common line break rule.
strict
break text using the stringent line break rule.

Formal syntax

CSS
auto <a href="css/value_definition_syntax#single_bar" title="Single bar">|</a> loose <a href="css/value_definition_syntax#single_bar" title="Single bar">|</a> normal <a href="css/value_definition_syntax#single_bar" title="Single bar">|</a> strict

Description  

The line-break CSS property is used to specify how (or if) to break lines.

Initial valueauto
Applies toall elements
Inheritedno
Mediavisual
Computed valueas specified
Animatableno
Canonical orderthe unique non-ambiguous order defined by the formal grammar

Browser Compatibility  

Feature Chrome Firefox (Gecko) Internet Explorer Opera Safari
Basic support 1.0 No support[1] 5.5[2] (Yes) (Yes)
Feature Android Chrome for Android Firefox Mobile (Gecko) IE Mobile Opera Mobile Safari Mobile
Basic support (Yes) 18.0 No support[1] ? ? (Yes)

[1] Gecko does not implement this feature yet. See bug 1011369.

[2] Internet Explorer 8 introduced -ms-line-break as a synonym for line-break. Don't use the -ms- prefix.

Specifications  

Specification Status Comment
CSS Text Level 3
The definition of 'line-break' in that specification.
Working Draft Initial definition

License

© 2016 Mozilla Contributors
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-us/docs/web/css/line-break

CSS CSS Property CSS Text NeedsExample Property Reference