CodePen

HTML

            
              <canvas id="blue-box-land"></canvas>
            
          
!

↑ Insert the most common viewport meta tag

CSS

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

JS

            
              var win = $(window);

var canvas = $("#blue-box-land");

function resize() {
  canvas
    .width(win.width())
    .height(win.height());
}

win.resize(resize).resize();

var ctx = canvas[0].getContext('2d');

ctx.fillStyle = "blue";
ctx.fillRect(50, 50, 200, 50);
            
          
!
Must be a valid URL.
+ add another resource
via JS Hint
Loading ..................