Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
<!DOCTYPE html>
<html>
<head>
<meta name="description" content="Simplest Canvas Example">
<title>HTML Test</title>
</head>
<body>
<canvas id="myCanvas" width="400" height="200"></canvas>
    <script>
      var canvas = document.getElementById('myCanvas');
      var context = canvas.getContext('2d');
        // this actually draws a square
        context.beginPath();
        context.rect(50,50,100,100);
        context.fill();
      </script>
</body>
</html>
Output

You can jump to the latest bin by adding /latest to your URL

Dismiss x
public
Bin info
gleicherpro
0viewers