(function() {
    "use strict";

    var h1 = document.getElementsByTagName("h1")[0];
    h1.style.backgroundColor = "lightblue";
})();

(function() {
    "use strict";

    document.getElementsByTagName("html")[0].className = "js";

    var h1 = document.getElementsByTagName("h1")[0];
    h1.style.backgroundColor = "lightblue";
})();

Change html element class when javascript is available
Change html element class when javascript is available
