1 <!DOCTYPE html>
2 <html lang="en"><head>
3 <meta charset="utf-8">
4 <title>[lang|="es"], lang="ES"</title>
5 <link href="mailto:ishida@w3.org" rel="author" title="Richard Ishida">
6 <link href="http://www.w3.org/TR/css3-selectors/#attribute-selectors" rel="help">
7 <script src="/resources/testharness.js"></script>
8 <script src="/resources/testharnessreport.js"></script>
9 <meta content="HTMLonly" name="flags">
10 <style type="text/css">
11 .test div { width: 50px; }
12 #colonlangcontroltest { color: red; font-weight: bold; width: 400px; }
13 #colonlangcontroltest[lang|=xx] { display:none; }
14 #box[lang|='es'] { width: 100px; }
15 #relevance[lang|='yy'] { display:none; }
16 </style>
17 </head>
18 <body>
19
20
21
22 <div class="test"><div lang="ES" id="box"> </div></div>
23 <p lang="xx" id="colonlangcontroltest">This test failed because it relies on [lang|=..] for results, but [lang|=..] is not supported by this browser.
24
25
26 <!--Notes:
27 This tests a detail related to [lang|=..] support. If [lang|=..] is not supported, a message will appear and the test will fail.
28 -->
29 <script>
30 test(function() {
31 assert_equals(document.getElementById('colonlangcontroltest').offsetWidth, 0)
32 assert_equals(document.getElementById('box').offsetWidth, 100);
33 }, "A lang|= value will match a lang attribute value regardless of case differences.");
34 </script>
35
36 </p><div id="log"></div>
37
38
39
40 </body></html>