<!DOCTYPE HTML>
<html>
<style>
body {background :black}
#c1 {background :white}
</style>
<script>
window.onload = function(){
var oC = document.getElementById('c1');
var oGC = oC.getContext('2d');
oGC.fillRect(0,0,100,100);
oGC.fillStyle = 'red';
oGC.fillRect(50,50,100,100);
};
</script>
<body>
<canvas id="c1" width = "400" height = "400"><canvas>
</body>
</html>
<html>
<style>
body {background :black}
#c1 {background :white}
</style>
<script>
window.onload = function(){
var oC = document.getElementById('c1');
var oGC = oC.getContext('2d');
oGC.fillRect(0,0,100,100);
oGC.fillStyle = 'red';
oGC.fillRect(50,50,100,100);
};
</script>
<body>
<canvas id="c1" width = "400" height = "400"><canvas>
</body>
</html>