pre-line-1.html (938B)
1 <!DOCTYPE HTML> 2 <html> 3 <head> 4 <style> 5 .preline { white-space:pre-line; } 6 span { background:yellow; } 7 .float { float:left; background:orange; } 8 .outer { overflow:auto; margin:1em; } 9 </style> 10 </head> 11 <body> 12 13 14 15 <!-- Note, in the following tests there are trailing spaces after "is" and on the second 16 blank line. --> 17 18 <div class="outer"><div class="preline">My name is 19 20 Fred.</div></div> 21 <div class="outer"><span class="preline">My name is 22 23 Fred.</span></div> 24 25 26 27 28 29 <div class="outer"><div class="preline float">My name is 30 31 Fred.</div></div> 32 <div class="outer"><div class="float"><span class="preline">My name is 33 34 Fred.</span></div></div> 35 36 37 38 39 40 <div class="outer"><div style="width:0;"><div class="preline float">My name is 41 42 Fred.</div></div></div> 43 <div class="outer"><div style="width:0;"><div class="float"><span class="preline">My name is 44 45 Fred.</span></div></div></div> 46 47 </body> 48 </html>