ident-003

Valid Identifiers (starting with -) as Classes and IDs

WeasyPrint

This browser

Flags
invalid

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: Valid Identifiers (starting with -) as Classes and IDs</title>
 5   <link rel="author" title="L. David Baron" href="http://dbaron.org/">
 6   <link rel="author" title="Ray Kiddy" href="mailto:ray@ganymede.org">
 7   <link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html#characters">
 8   <meta name="flags" content="invalid">
 9   <style type="text/css">
10 
11   .one { color: red; background: white; }
12   .-ident, .one { color: green; }
13 
14   .two { color: red; background: white; }
15   #-ident, .two { color: green; }
16 
17   .three { color: green; background: white; }
18   .-1ident, .three { color: red; }
19 
20   .four { color: green; background: white; }
21   #-1ident, .four { color: red; }
22 
23   .five { color: red; background: white; }
24   .-\31ident, .five { color: green; }
25 
26   .six { color: red; background: white; }
27   #-\31ident, .six { color: green; }
28 
29   </style>
30  </head>
31  <body>
32 
33  <p class="one">This should be green.</p>
34  <p class="two">This should be green.</p>
35  <p class="three">This should be green.</p>
36  <p class="four">This should be green.</p>
37  <p class="five">This should be green.</p>
38  <p class="six">This should be green.</p>
39 
40  </body>
41 </html>