OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <html xml:lang="ko" > | 2 <html > |
3 <head> | 3 <head> |
4 <meta charset="utf-8"/> | 4 <meta charset="utf-8"/> |
5 <title>xml:lang attribute in html tag</title> | 5 <meta http-equiv="Content-Language" content="ko,zh,ja" > |
| 6 <title>Multiple languages in Content-Language meta element</title> |
6 <link rel='author' title='Richard Ishida' href='mailto:ishida@w3.org'> | 7 <link rel='author' title='Richard Ishida' href='mailto:ishida@w3.org'> |
7 <link rel='help' href='https://html.spec.whatwg.org/multipage/#the-lang-and-xml:
lang-attributes'> | 8 <link rel='help' href='https://html.spec.whatwg.org/multipage/#pragma-directives
'> |
8 <script src="../../../../../../resources/testharness.js"></script> | 9 <script src="../../../../../../resources/testharness.js"></script> |
9 <script src="../../../../../../resources/testharnessreport.js"></script> | 10 <script src="../../../../../../resources/testharnessreport.js"></script> |
10 <meta name='flags' content='dom'> | 11 <meta name='flags' content='dom'> |
11 <style type='text/css'> | 12 <style type='text/css'> |
12 #colonlangcontroltest { color: red; font-weight: bold; width: 400px; } | 13 #colonlangcontroltest { color: red; font-weight: bold; width: 400px; } |
13 #colonlangcontroltest:lang(xx) { display:none; } | 14 #colonlangcontroltest:lang(xx) { display:none; } |
14 .test div { width: 50px; } | 15 .test div { width: 50px; } |
| 16 |
15 #box:lang(ko) { width: 100px; } | 17 #box:lang(ko) { width: 100px; } |
| 18 #box:lang(zh) { width: 100px; } |
| 19 #box:lang(ja) { width: 100px; } |
| 20 |
| 21 /* styling for debugging related notes */ |
| 22 .notes span:lang(ko) { background-color: #0000FF; color: white; padding: 0
5px; } |
| 23 .notes span:lang(zh) { background-color: #0000FF; color: white; padding: 0
5px; } |
| 24 .notes span:lang(ja) { background-color: #0000FF; color: white; padding: 0
5px; } |
| 25 |
16 </style> | 26 </style> |
17 </head> | 27 </head> |
18 <body> | 28 <body> |
19 | 29 |
20 | 30 |
21 | 31 |
22 <div class="test"><div id="box"> </div></div> | 32 <div class="test"><div id="box"> </div></div> |
23 <p lang='xx' id='colonlangcontroltest'>This test failed because it relies on :la
ng for results, but :lang is not supported by this browser.</p> | 33 <p lang='xx' id='colonlangcontroltest'>This test failed because it relies on :la
ng for results, but :lang is not supported by this browser.</p> |
24 | 34 |
25 | 35 |
26 <!-- Notes: | 36 <!-- Notes: |
27 | 37 |
28 This test uses :lang to detect whether the language has been set. If :lang is no
t supported, a message will appear and the test will fail. | 38 This test uses :lang to detect whether the language has been set. If :lang is no
t supported, a message will appear and the test will fail. |
29 | 39 |
30 --> | 40 --> |
31 <script> | 41 <script> |
32 test(function() { | 42 test(function() { |
33 assert_equals(document.getElementById('colonlangcontroltest').offsetWidth, 0) | 43 assert_equals(document.getElementById('colonlangcontroltest').offsetWidth, 0) |
34 assert_equals(document.getElementById('box').offsetWidth, 50); | 44 assert_equals(document.getElementById('box').offsetWidth, 50); |
35 }, "The browser will NOT recognize a language declared in an xml:lang attribute
on the html tag."); | 45 }, "The UA will not recognize a language declaration in the Content-Language met
a element when more than one language is declared."); |
36 </script> | 46 </script> |
37 | 47 |
38 <div id='log'></div> | 48 <div id='log'></div> |
39 | 49 |
40 </body> | 50 </body> |
41 </html> | 51 </html> |
OLD | NEW |