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

CSS3 word-wrap property


May 06, 2021 CSS Reference Manual


Table of contents


CSS3 word-wrap property

Description of property definition and use

Word-wrap properties allow long content to wrap automatically.

Default: normal
Inherited: yes
Version: CSS3
JavaScript syntax: object .style.wordWrap="break-word"

grammar

word-wrap: normal|break-word;
Value Describe
normal Line breaks only at the allowed word breaks (the browser remains the default).
break-word Line inside a long word or URL address.

Browser support

The numbers in the table support the first browser version number of the property.

Attributes
word-wrap 4.0 5.5 3.5 3.1 10.5

Specify that if it is long enough, it should be retreded:

p.test {word-wrap:break-word;}

Try it out . . .

Related articles

CSS3 tutorial: CSS3 Text Effects