<!doctype html>
<html>
<head>
<title>canvasExample</title>
</head>
<body>
<script type="text/javascript">
var c1 = document.createElement('canvas');
document.body.appendChild(c1);
c1.style.height = "400px";
c1.style.width = "400px";
ctx = c1.getContext('2d');
ctx.fillRect(110, 110, parseInt(c1.style.width), parseInt(c1.style.height));
</script>
</body>
</html>