title: HTML5 Canvas Line not showing
body: <p>I am currently following this tutorial to draw just a basic line (<a href="http://www.sitepoint.com/html5-canvas-tutorial-introduction/" rel="nofollow">http://www.sitepoint.com/html5-canvas-tutorial-introduction/</a>). I have tried with codepen(<a href="http://codepen.io/anon/pen/qOEYaa" rel="nofollow">http://codepen.io/anon/pen/qOEYaa</a>) </p>
  
  <p>html</p>
  
  <pre><code>     &lt;canvas id="exampleCanvas" width="500" height="300"&gt;
     &lt;!-- OPTION 1: leave a message here if browser doesn't support canvas --&gt;
            Your browser doesn’t currently support HTML5 Canvas. Please check caniuse.com/#feat=canvas for information on browser support for canvas. 
  
          &lt;!-- OPTION 2: put fallback content (text, image, Flash, etc.) if the browser doesn't support canvas --&gt;
      &lt;/canvas&gt;
  </code></pre>
  
  <p>js</p>
  
  <pre><code>var canvas = document.getElementById('exampleCanvas'),
  context = canvas.getContext('2d');
  context.beginPath();
  context.moveTo(50,50);
  context.lineTo(250,150);
  context.stroke();
  </code></pre>
  
  <p>css</p>
  
  <pre><code>canvas {
    border: solid 1px #000;
  }
  </code></pre>
  
  <p>and the black line does manage to appear. When I am using my browser, I added in the html tags but the lines are not showing.</p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html&gt;
  &lt;head&gt;
      &lt;script type="text/javascript"&gt;
          var canvas = document.getElementById('exampleCanvas'),
          context = canvas.getContext('2d');
          context.beginPath();
          context.moveTo(50,50);
          context.lineTo(250,150);
          context.stroke();
      &lt;/script&gt;
  &lt;/head&gt;
  &lt;body&gt;
       &lt;canvas id="exampleCanvas" width="500" height="300" style="border:1px solid #000000;"&gt;
     &lt;!-- OPTION 1: leave a message here if browser doesn't support canvas --&gt;
            Your browser doesn’t currently support HTML5 Canvas. Please check caniuse.com/#feat=canvas for information on browser support for canvas. 
  
          &lt;!-- OPTION 2: put fallback content (text, image, Flash, etc.) if the browser doesn't support canvas --&gt;
          &lt;/canvas&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>