What is the difference between 'word-wrap', 'word-break', 'overflow-wrap'?

Submitted 3 years, 6 months ago
Ticket #221
Views 246
Language/Framework CSS
Priority Low
Status Closed

What is the key difference beween these CSS properties and when to use them?
Thanks in advance!

Submitted on Oct 07, 20
add a comment

1 Answer

Verified

word-wrap: The word-wrap CSS property is used to specify whether or not the browser may break lines within words in order to prevent overflow when an otherwise unbreakable string is too long to fit in its containing box.

overflow-wrap: The overflow-wrap CSS property applies to inline elements, setting whether the browser should insert line breaks within an otherwise unbreakable string to prevent text from overflowing its line box.Word-wrap property has been renamed overflow-wrap in the current draft of the CSS3 Text specification.


word-break: The word-break CSS property is used to specify how (or if) to break lines within words.

Submitted 3 years, 6 months ago
sai


Latest Blogs