css3-selectors-lang-021.html (791B)
1 <!DOCTYPE html> 2 <html lang="en" > 3 <head> 4 <meta charset="utf-8"/> 5 <title>[lang|="es"], lang="es"</title> 6 <link rel='author' title='Richard Ishida' href='mailto:ishida@w3.org'> 7 <link rel='help' href='http://www.w3.org/TR/css3-selectors/#attribute-selectors'> 8 <script src="/resources/testharness.js"></script> 9 <script src="/resources/testharnessreport.js"></script> 10 <style type='text/css'> 11 .test div { width: 50px; } 12 #box[lang|='es'] { width: 100px; } 13 </style> 14 </head> 15 <body> 16 17 18 19 <div class="test"><div id="box" lang="es"> </div></div> 20 21 22 <script> 23 test(function() { 24 assert_equals(document.getElementById('box').offsetWidth, 100); 25 }, "A lang|= value that matches an identical lang attribute value on the same element will produce styling."); 26 </script> 27 28 <div id='log'></div> 29 30 </body> 31 </html>