content-white-space-002.xht (1371B)
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> 2 <html xmlns="http://www.w3.org/1999/xhtml"> 3 <head> 4 <title>CSS Test: Content property and white-space: pre</title> 5 <link rel="author" title="Elika J. Etemad" href="http://fantasai.inkedblade.net/contact" /> 6 <link rel="author" title="Microsoft" href="http://www.microsoft.com/" /> 7 <link rel="help" href="http://www.w3.org/TR/CSS21/generate.html#content" /> 8 <link rel="match" href="content-white-space-002-ref.html" /> 9 <meta name="assert" content="'white-space: pre' applies to generated string content." /> 10 <style type="text/css"> 11 div { 12 border: solid silver; 13 margin: 0.5em; 14 padding: 0.2em; 15 color: blue; 16 } 17 #reference 18 { 19 white-space: pre; 20 } 21 #test:before 22 { 23 content: "This text\A should be on\A four\A lines."; 24 white-space: pre; 25 } 26 </style> 27 </head> 28 <body> 29 <p>Test passes if the contents of the two silver boxes are identical.</p> 30 <div id="reference">This text 31 should be on 32 four 33 lines.</div> 34 <div id="test"></div> 35 </body> 36 </html>