The overflow-wrap property allows breaking long, otherwise-unbreakable words (like a long URL) in the middle, to prevent overflow. Same as word-wrap (legacy alias). Less aggressive than word-break.p {
overflow-wrap: break-word;
}.narrow-cell {
overflow-wrap: anywhere;
word-break: normal;
}normalBreaking only at normal soft-wrap opportunities (default).break-wordIf the word doesn't fit — break anywhere within it. Normal break points still preferred.anywhereLike break-word, but the post-break segments also count toward min-content size — helps grid/flex.CSS Text Module Level 4Editor's DraftW3CMDNIn the beginning God created the heavens and the earth.
Nowtheearthwasformlessandempty,darknesswasoverthesurfaceofthedeep,andtheSpiritofGodwashoveringoverthewaters.
And God said, “Let there be light,” and there was light.
Show all codeEdit CSS onlineThe plugin that remembers hundreds of CSS items for youEvery CSS property — in a live demonstrationThe bilingual CSS referencedefinitionexamplessyntaxmodulespecificationsourcesvisual demonstrationpreviousnext