lang-pseudoclass-001

:lang pseudoclass

WeasyPrint

This browser

Flags
HTMLonly
Assertion
:lang pseudoclass in HTML should not be case-sensitive, and match a substring

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: :lang pseudoclass</title> 
 5     <link rel="author" title="Richard Ishida" href="mailto:ishida@w3.org">
 6     <link rel="author" title="Eira Monstad, Opera Software ASA" href="mailto:public-testsuites@opera.com">
 7     <link rel="help" href="http://www.w3.org/TR/CSS21/selector.html#lang">
 8     <meta name="flags" content="HTMLonly">
 9     <meta name="assert" content=":lang pseudoclass in HTML should not be case-sensitive, and match a substring">
10     <style type="text/css">
11       div:lang(es) { color:white;background-color:green; }
12       p:lang(es) { color:white;background-color:green; }
13       p:lang(fr) { color:white;background-color:green; }
14       em:lang(de) { color:white;background-color:green; }
15       div:lang(en-GB) { color:white;background-color:green; }
16     </style> 
17   </head> 
18   <body> 
19 
20     <div lang="es">This line should be green</div>
21     <div lang="es-MX">This line should be green</div>
22     <div lang="ES">This line should be green</div>
23 
24     <div lang="en-GB">This line should be green</div>
25     <div lang="en-GB-scouse">This line should be green</div>
26 
27     <p lang="es">This line should be green <em>and this should be green too</em></p>
28     <div lang="fr"><p>This line should be green</p>This line should NOT be green</div>
29     <p lang="de">This line should NOT be green <em>but this should be green</em></p>
30 
31     <div lang="MX-es">This line should NOT be green</div>
32     <div lang="en-US">This line should NOT be green</div>
33     <div lang="en">This line should NOT be green</div>
34   </body>
35 </html>