1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
<!DOCTYPE html> <html> <body> <pre id="pre">This test is to check pre formatting.</pre> <div id="div-pre" style="white-space:pre">This test is to check pre formatting</div> <div id="div-pre-wrap" style="white-space:pre-wrap">This test is to check pre formatting.</div> <div id="div-normal">This test is to check pre formatting.</div> </body> </html>