<!-- Quirks on purpose --> <head> <style> body { color: red; } .Foo { color: green; } </style> <body onload="document.body.className = 'abc Foo'" class="abc"> This should be green </body> </head>