cssword-wrap

What's the deal with white-space and text-wrap?


I've been using white-space and was happy with it. Still am. Then, I noticed that there's something called text-wrap too. I've seen somewhere on the internet that there's no browser support for the latter. However, it's not in the plans for the future nor is it deprecated (let alone obsolete).

So what's that for? Should I regard it in any way?


Solution

  • text-wrap was originally in CSS Text level 3. It has since been deferred to level 4. The difference between it and white-space is that white-space is changed to be a shorthand of two other properties, one of which is text-wrap. That's all you need to know for now; any other details are highly subject to change and simply not relevant at this point.

    You can disregard text-wrap for now. W3Schools is correct in stating that no browser supports it at the moment. You can also continue using white-space as normal; its syntax will not change even once the newer version is implemented by browsers.