first-line-000

Selectors: The :first-line pseudo-element

WeasyPrint

This browser

Assertion
Browsers should apply the rule only to the first line of a block-level element

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: Selectors: The :first-line pseudo-element</title>
 5   <link rel="author" title="Gabriele Romanato" href="mailto:gabriele.romanato@gmail.com">
 6   <link rel="help" href="http://www.w3.org/TR/CSS21/selector.html#first-line-pseudo">
 7   <meta name="flags" content="">
 8   <meta name="assert" content="Browsers should apply the rule only to the first line of a block-level element">
 9 <style type="text/css">
10 p, div {color: silver}
11 p:first-line, div span {color: fuchsia}
12 
13 </style>
14  </head>
15  <body>
16 <p>The first line of this paragraph should be fuchsia (same as in the next block).<br>Filler text.</p>
17 <div><span>Lorem ipsum dolor.</span><br>Filler text.</div>
18 
19 
20  </body>
21 </html>