| <!DOCTYPE html> | |
| <!-- | |
| | Wrapping is only performed at an allowed break point, called a soft wrap | |
| | opportunity. In most writing systems, in the absence of hyphenation a soft | |
| | wrap opportunity occurs only at word boundaries. | |
| | https://www.w3.org/TR/css3-text/#soft-wrap-opportunity | |
| | https://www.w3.org/TR/css-text-3/#line-break-details | |
| | | |
| | All soft wrap segments that can fully fit within the available width will be | |
| | included on the line. | |
| --> | |
| <html> | |
| <head> | |
| <style> | |
| body { | |
| margin: 0px; | |
| font-family: Roboto; | |
| font-size: 20px; | |
| } | |
| div { | |
| word-wrap: break-word; | |
| } | |
| .containing-block { | |
| background-color: #03a9f4; | |
| width: 110px; | |
| } | |
| </style> | |
| </head> | |
| <body> | |
| <div class="containing-block"> | |
| <div><span>abcd<span>ef gh</span>i jkl</span></div> | |
| <div><span>ab cd<span>efgh</span> ijkl</span></div> | |
| <div><span>abcd<span>ef gh </span>ijkl</span></div> | |
| <div><span>abcd <span>ef gh</span>ijkl</span></div> | |
| <div><span>ab cd<span> efgh</span>ijkl</span></div> | |
| <div><span>ab cd <span>efgh</span>ijkl</span></div> | |
| <div><span>ab c d<span>efgh</span>ijkl</span></div> | |
| <div><span> abcd<span>efgh</span>ijkl</span></div> | |
| </div> | |
| </body> | |
| </html> |