using-strings-001.html (885B)
1 <!DOCTYPE html> 2 <html> 3 <head> 4 <meta charset="utf-8"> 5 <title>CSS Test: using 'first' property of named strings</title> 6 <link rel="author" title="Dave Cramer" href="mailto:dauwhe@gmail.com"> 7 <link rel="help" href="http://www.w3.org/TR/css-gcpm-3/#string-first"> 8 <meta name="flags" content="paged"> 9 <meta name="assert" content="Test checks that the default value of the string property is first, so that the first instance of a named string on the page is used."> 10 <style> 11 @page { 12 @top-center { 13 content: string(section); 14 } 15 } 16 17 h2 { 18 string-set: section content(); 19 20 } 21 22 23 24 </style> 25 </head> 26 <body> 27 <p>Test passes if “Section One” is in the running head at the top of the page.</p> 28 <h2 id="s1">Section One</h2> 29 <h2 id="s2">Section Two</h2> 30 <h2 id="s3">Section Three</h2> 31 <h2 id="s4">Section Four</h2> 32 <h2 id="s5">Section Five</h2> 33 <h2 id="s6">Section Six</h2> 34 </body> 35 </html>