HTML Editor
<!DOCTYPE html> <html lang="en-US"> <head> <style> div{ border: 1px solid black; padding:10px; width: 300px; } #point{ white-space: normal; } #point1{ white-space: nowrap; } #point2{ white-space: pre; } #point3{ white-space: pre-line; } #point3{ white-space: pre-wrap; } </style> </head> <body> <h1>CSS white-space Property</h1> <h2>white-space: normal;</h2> <div id="point"> This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. </div> <h2>white-space: nowrap;</h2> <div id="point1"> This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. </div> <h2>white-space: pre;</h2> <div id="point2"> This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. </div> <h2>white-space: pre-line;</h2> <div id="point3"> This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. </div> <h2>white-space: pre-wrap;</h2> <div id="point4"> This is some text. This is some text. This is some text. This is some text. This is some text. This is some text. </div> </body> </html>
OUTPUT
×

Save as Private