0

Is there any difference (apart from browser support) in terms of behavior between the following css properties?

overflow-wrap: break-word;

and

word-wrap: break-word;

Perhaps word-wrap property has been just renamed to overflow-wrap in the current draft of the CSS3 Text specification?

I tried both on Chrome and seems to work in exact same way.

Am I correct or I'm missing something? Which one do I have to use?

halfer
  • 19,824
  • 17
  • 99
  • 186
willy wonka
  • 1,440
  • 1
  • 18
  • 31
  • http://caniuse.com might help you find out about support and what to use . – G-Cyrillus Jul 06 '19 at 19:55
  • @Temani Afif: Hi thanks for passing by. I already seen and read the question you noticed as duplicate of this one. But please notice that I'm talking about **word-wrap: break-word;** not about **word-break: break-word;** contained into the answer you've noticed. Thank you anyway. – willy wonka Jul 07 '19 at 00:32
  • @G-Cyr Thank you for the comment, but the question specifies "a part the browser support", because I already know that aspect. What I'm asking in fact is if the two statements behave in different way somewhere because I'm not certain of that aspect. – willy wonka Jul 07 '19 at 00:36
  • Updated the duplicate list – Temani Afif Jul 07 '19 at 00:38
  • @TemaniAfif Thank you but please would you please specify some more infos: I'm asking about **word-wrap:** statement you're kindly pointing out about the statement **word-break:**. As far as I know they are different css3 properties. Are they? – willy wonka Jul 07 '19 at 00:43
  • 1
    from the first duplicate you can read: *word-wrap property has been renamed overflow-wrap in the current draft of the CSS3 Text specification* ... then in the second one : *word-wrap is a legacy name for overflow-wrap. word-wrap is required for IE (11), Edge, and Opera Mini. Other major browsers now all support overflow-wrap (source).* – Temani Afif Jul 07 '19 at 00:47
  • @TemaniAfif In other words the standard is **overflow-wrap** and the other perhaps is going to be deprecated in future so it is better to use **overflow-wrap** for css3 compliant browsers? – willy wonka Jul 07 '19 at 00:56
  • 1
    overflow-wrap is the standard name for its predecessor, the word-wrap property. word-wrap was originally a proprietary Internet Explorer-only feature that was eventually supported in all browsers despite not being a standard. word-wrap accepts the same values as overflow-wrap and behaves the same way. According to the spec, browsers "must treat word-wrap as an alternate name for the overflow-wrap property, as if it were a shorthand of overflow-wrap". Also, all user agents are required to support word-wrap indefinitely, for legacy reasons. – willy wonka Jul 07 '19 at 01:02

1 Answers1

1

There is no difference between the two. overflow-wrap is the same as word-wrap. As you pointed out, word-wrap was renamed to overflow-wrap as this Post shows.

Correia7
  • 364
  • 3
  • 10