The word-wrap attribute is used to break in one line and wrap to the next line.
The example syntax is shown below −
Live demonstration
<!DOCTYPE html> <html> <head> <style> div { width: 200px; border: 2px solid #000000; } div.b { word-wrap: break-word; } </style> </head> <body> <h2>word-wrap: break-word property</h2> <div class = "b"> ThisisdemotextThisisdemotext: thisisaveryveryveryveryveryverylongword. The long word wraps to the next line.</div> </body> </html>
The above is the detailed content of CSS word wrap property. For more information, please follow other related articles on the PHP Chinese website!