c24-first-lttr-000

first-letter

WeasyPrint

This browser

Source

 1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
 2 <html>
 3  <head>
 4   <title>CSS Test: first-letter</title>
 5   <link rel="help" href="http://www.w3.org/TR/REC-CSS1#the-first-letter-pseudo-element">
 6   <link rel="author" title="CSS1 Test Suite Contributors" href="http://www.w3.org/Style/CSS/Test/CSS1/current/tsack.html">
 7   <link rel="author" title="Ian Hickson" href="mailto:ian@hixie.ch">
 8   <style type="text/css">
 9    body { color: blue; }
10    p:first-letter {color: green;}
11    .two:first-letter {font-size: 200%;}
12    p.three:first-letter {font-size: 350%;}
13   </style>
14   <link rel="help" href="http://www.w3.org/TR/CSS21/selector.html#first-letter" title="5.12.2 The :first-letter pseudo-element">
15  </head>
16  <body>
17   <p>
18    The <strong>first letter</strong> of this paragraph, and only that
19    one, should be <strong>green</strong>. If this precise combination
20    does not occur, then the user agent has failed this test.
21   </p>
22   <p class="two">
23    The <strong>first letter</strong> of this paragraph, and only that
24    one, should be in a <strong>larger</strong> font size, as well as
25    <strong>green</strong>. If this precise combination does not occur,
26    then the user agent has failed this test.
27   </p>
28   <p class="three">
29    "The <strong>first two characters</strong> in this paragraph (a
30    double-quote mark and a capital 'T') should be in a <strong>much
31    larger</strong> font size than the rest of the paragraph, and
32    <strong>green</strong>. If this precise combination does not occur,
33    then the user agent has failed this test.
34   </p>
35  </body>
36 </html>