Difference between overflow-wrap and word-break?

Quoting from source

  • 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: 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

So, you need word-break in combination with word-wrap, which is the right combination.

Leave a Comment