MDN wants to learn about developers like you: https://qsurvey.mozilla.com/s3/d6d7ff2e2f9c

Relawan kami belum menerjemahkan artikel ini ke dalam Bahasa Indonesia. Bergabunglah dan bantu kami menyelesaikan pekerjaan ini!
Anda juga bisa membaca artikel dalam English (US).

This is an experimental technology
Check the Browser compatibility table carefully before using this in production.

The line-break CSS property is used to specify how (or if) to break lines when working with punctuation and symbols.

/* 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;
Initial valueauto
Applies toall elements
Inheritedno
Mediavisual
Computed valueas specified
Animation typediscrete
Canonical orderthe unique non-ambiguous order defined by the formal grammar

Syntax

Values

auto
Break text using the default line break rule.
loose
Break text using the least restrictive line break rule. Typically used for short lines, such as in newspapers.
normal
Break text using the most common line break rule.
strict
Break text using the most stringent line break rule.

Formal syntax

auto | loose | normal | strict

Specifications

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

Browser compatibility

Feature Chrome Edge Firefox (Gecko) Internet Explorer Opera Safari
Basic support 1 -webkit
58 (unprefixed)
(Yes) No support[1] 5.5[2] (Yes) -webkit
45 (unprefixed)
(Yes)
Feature Android Webview Chrome for Android Edge Firefox Mobile (Gecko) IE Mobile Opera Mobile Safari Mobile
Basic support (Yes) -webkit
58 (unprefixed)
18 -webkit
58 (unprefixed)
(Yes) No support[1] ? (Yes) -webkit
45 (unprefixed)
(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.

Tag Dokumen dan Kontributor

 Kontributor untuk laman ini: mfluehr, jpmedley, DailyAlice, erikadoyle, Siilwyn, Sebastianz, fscholz, ishita, mkato, teoli
 Terakhir diperbarui oleh: mfluehr,