content-applies-to-001.xht (911B)
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 works only with :before and :after</title> 5 <link rel="author" title="Microsoft" href="http://www.microsoft.com/" /> 6 <link rel="help" href="http://www.w3.org/TR/CSS21/generate.html#content" /> 7 <meta name="assert" content="Content property only works in conjunction with the :before and :after pseudo-elements." /> 8 <style type="text/css"> 9 div 10 { 11 content: "GENERATED"; 12 } 13 </style> 14 </head> 15 <body> 16 <p>Test passes if only the words "Filler Text" or the word "GENERATED" appear below. If both "Filler Text" and "GENERATED" are present the test fails.</p> 17 <div>Filler Text</div> 18 </body> 19 </html>