first-letter-002.html (940B)
1 <!doctype html> 2 <html> 3 <head> 4 <meta charset="utf-8"> 5 <title>CSS Test: ::first-letter formatting</title> 6 <link rel="author" title="Florian Rivoal" href="mailto:florian@rivoal.net"> 7 <link rel="match" href="first-letter-001-ref.html"> 8 <link rel="help" href="https://drafts.csswg.org/css-pseudo-4/#first-letter-styling"> 9 <meta name="assert" content="Test checks that a floated ::first-letter is formatted identically to a floated non-pseudo element with the same content."> 10 <style> 11 div { 12 font-size: 50px; 13 position: absolute; 14 left: 30px; 15 top: 50px; 16 } 17 #d1 span { 18 color: red; 19 background: red; 20 float: left; 21 } 22 #d2::first-letter { 23 color: green; 24 background: green; 25 float: left; 26 } 27 </style> 28 </head> 29 <body> 30 <p>Test passes if there is a <strong>filled green rectangle</strong> and <strong>no red</strong>.</p> 31 <div id="d1"><span>a</span></div> 32 <div id="d2">a</div> 33 </body> 34 </html>