Sjoerd innocently mentions this trick in a comment on the blog of the W3C HTML WG co-chair, Sam Ruby:
Btw, if you want CSS rules to apply to unknown elements in IE, you just have to do document.createElement(elementName). This somehow lets the CSS engine know that elements with that name exist
Ian Hickson, lead editor of the HTML5 spec, stood surprised, along the rest of the web, that he had never heard this trick before and was happy to report: “This piece of information makes building an HTML5 compatibility shim for IE7 far easier than had previously been assumed.”
John Resig, one day later, wrote the post that coined the term “HTML5 Shiv”. While it technically is a “shim” and John admitted this later, the proliferation of assorted HTML5 shims nowadays makes a good case for us to continue using “shiv” for this solution. Chris Wilson, then of the IE Team, said “I want to jam standards support into (this and future versions of) Internet Explorer. If a shiv is the only pragmatic tool I can use to do so, shouldn’t I be using it?”
Throw it on the html tag
Here is the new recommendation, and the one that’s in use in the HTML5 Boilerplate.
Why?
I left an empty class in there because you’ll probably be putting a no-js in there or something else. If not, delete.
(...)