<title>Attributes on &lt;/p></title>
<style>
p { background:lime; width:10em; height:10em; }
.fail { background:red; }
</style>
There should be a green square and no red below: </p class=fail>
<script>
 var result = false;
 var elm = document.getElementsByTagName("p")[0];
 if (elm) {
   result = true;
   if (elm.className == "fail")
     result = false;
 }
 if (window.testRunner)
   testRunner.dumpAsText();
 document.write(result ? "PASS" : "FAIL");
</script>
