HTML5 Introduction Examples




HTML5 canvas into HTML documents examples

<!DOCTYPE html>
<html>
   <head>
      <title>HTML5 canvas into HTML documents examples</title>
      <script type="text/javascript">
         window.onload = function() {
            var canvas = document.getElementById("myCanvas");
            var context = canvas.getContext("2d");
            // draw stuff here
         };
      </script>
   </head>
   <body>
      <canvas id="myCanvas" width="300" 
      height="250"></canvas>
   </body>
</html>

Output