content-attr-002.xht (941B)
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: Generated Content from Attributes</title> 5 <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch"/> 6 <link rel="alternate" href="http://www.hixie.ch/tests/adhoc/css/content/attributes/001.html" type="text/html"/> 7 <link rel="help" href="http://www.w3.org/TR/CSS21/generate.html#content" /> 8 9 <style type="text/css"> 10 html, body, head { margin: 0; padding: 0; display: block; } 11 head * { display: none; } 12 link, p { display: block; margin: 1em; } 13 link:before { content: 'The test has '; } 14 link:after { content: attr(media); } 15 </style> 16 <link rel="stylesheet" href="support/content-attr-002.css" media="passed."/> 17 </head> 18 <body> 19 <p>Test passes if there is a sentence above which says "The test has passed."</p> 20 </body> 21 </html>