div { width: 400px; border: 1px solid #000000; margin: 2em 0; } .ex1 {white-space: normal;} .ex2 {white-space: nowrap;} .ex3 {white-space: pre;} .ex4 {white-space: pre-wrap;} .ex5 {white-space: pre-line;}
<!DOCTYPE html> <html lang="ko"> <head></head> <body> <h1>white-space</h1> <div class="ex1"><b>normal</b><br> Once when I was six years old I saw a magnificent picture in a book, called True Stories from Nature, about the primeval forest.</div> <div class="ex2"><b>norwrap</b><br> Once when I was six years old I saw a magnificent picture in a book, called True Stories from Nature, about the primeval forest.</div> <div class="ex3"><b>pre</b><br> Once when I was six years old I saw a magnificent picture in a book, called True Stories from Nature, about the primeval forest.</div> <div class="ex4"><b>pre-wrap</b><br> Once when I was six years old I saw a magnificent picture in a book, called True Stories from Nature, about the primeval forest.</div> <div class="ex5"><b>pre-line</b><br> Once when I was six years old I saw a magnificent picture in a book, called True Stories from Nature, about the primeval forest.</div> </body> </html>