tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

the-lang-attribute-005.html (1417B)


      1 <!DOCTYPE html>
      2 <html   lang="ko" >
      3 <head>
      4 <meta charset="utf-8"/>
      5 <title>HTTP header and html lang</title>
      6 <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 <script src="/resources/testharness.js"></script>
      9 <script src="/resources/testharnessreport.js"></script>
     10 <meta name='flags' content='http dom'>
     11 <style type='text/css'>
     12    #colonlangcontroltest { color: red; font-weight: bold; width: 400px; }
     13    #colonlangcontroltest:lang(xx) { display:none; }
     14 .test div { width: 50px; }
     15 #box:lang(ko) { width: 100px; }
     16 </style>
     17 </head>
     18 <body>
     19 
     20 
     21 
     22 <div class="test"><div id="box">&#xA0;</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.</p>
     24 
     25 
     26 <!--Notes:
     27 
     28 This test uses :lang to detect whether the language has been set. If :lang is not supported, a message will appear and the test will fail.
     29 
     30 -->
     31 <script>
     32 test(function() {
     33 assert_equals(document.getElementById('colonlangcontroltest').offsetWidth, 0)
     34 assert_equals(document.getElementById('box').offsetWidth, 100);
     35 }, "If there is a conflict between the language declarations in the HTTP header and the html element using lang, the browser will recognize the language declared in the html element.");
     36 </script>
     37 
     38 <div id='log'></div>
     39 
     40 </body>
     41 </html>