<html xmlns="http://www.w3.org/1999/xhtml">
 <head>
  <title>Whitespace</title>
  <script>
   window.onload = function() {
     var chars = [0x20,0x9,0xa,0xb,0xc,0xd];
     var pi;
     for (var i = 0; i &lt; chars.length; ++i) {
       try {
         pi = document.createProcessingInstruction('xml-stylesheet', 'type="text/css"' + String.fromCharCode(chars[i]) + 'href="data:text/css,#c' + chars[i].toString(16) + ' { background:yellow; }"');
         document.insertBefore(pi, document.documentElement);
       } catch(e) {
         document.getElementById("c" + chars[i].toString(16)).firstChild.data = e;
       }
     }
   }
  </script>
 </head>
 <body>
  <p id="c20">If this line is yellow, then u+0020 is whitespace</p>
  <p id="c9">If this line is yellow, then u+0009 is whitespace</p>
  <p id="ca">If this line is yellow, then u+000a is whitespace</p>
  <p id="cb">If this line is yellow, then u+000b is whitespace</p>
  <p id="cc">If this line is yellow, then u+000c is whitespace</p>
  <p id="cd">If this line is yellow, then u+000d is whitespace</p>
 </body>
</html>
