Coding With Fun
Home Docker Django Node.js Articles Python pip guide FAQ Policy

CSS3 word-break property


May 06, 2021 CSS Reference Manual


Table of contents


Definitions and usages

The word-break property specifies how line breaks are handled.

Tip: By using the word-break property, you can let the browser implement line breaks anywhere.

Default: normal
Inheritance: yes
Version: CSS3
JavaScript syntax: object .style.wordBreak="keep-all"

Grammar

word-break: normal|break-all|keep-all;
Value Describe
normal Use the browser's default line-by-line rule.
break-all Allows line-ups within words.
keep-all Line changes can only be made at half-corner spaces or hyphens.

Browser support

Property




word-break 4.0 5.5 15.0 3.1 15.0

Word-break properties are supported in all major browsers.


Line break at the right word break point:

p.test {word-break:hyphenate;}