<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html
  PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
  <head>
    <title> 1. Canvas Beispiel </title>
    <meta name="author" content="Administrator"/>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <link rel="stylesheet" type="text/css"
      href="html5-canvas02.css" title="style1"/>

      
    </head>
    
<body>
  <h1>2. Canvas Beispiel</h1>
  
  <canvas    id="myCanvas" width="300" height="300"  style="border:1px solid #FF0000;"  >
    Your browser does not support the HTML5 canvas tag.
  </canvas>
      <script type="application/javascript"  >
       // <![CDATA[
        var c = document.getElementById("myCanvas");
        if (c.getContext){
          var ctx = c.getContext("2d");
          ctx.beginPath();
          for (i=0;i<15;i++){
             ctx.lineWidth = 1+i;
             ctx.beginPath();
             ctx.moveTo(5+i*20,5);
             ctx.lineTo(5+i*20,240);
             ctx.stroke();
             ctx.closePath();
          }
        }
        else {
        alert("No support for canvas");
        }
      // ]]>
      </script>
  
  
</body>

</html>




