CodePen

HTML

            
              
            
          
!

↑ Insert the most common viewport meta tag

CSS

            
              html, body {
  height: 100%;
}
            
          
!
? ?
? ?
Must be a valid URL.
+ add another resource
via CSS Lint

JS

            
              var div = document.createElement("div");

div.style.width = "50%";
div.style.height = "50%";
div.style.position = "relative";
div.style.top = "50%";
div.style.left = "50%";
div.style.marginLeft = "-25%";
div.style.marginTop = "-8%";
div.style.backgroundColor = "blue";

var body = document.getElementsByTagName("body")[0];

body.appendChild(div);
            
          
!
Must be a valid URL.
+ add another resource
via JS Hint
Loading ..................