title: Having trouble with drawing 2D in HTML
body: <p>I'm not sure how this would work for making a 2D game, I need to draw a <code>Rectangle</code> and am not sure why it isn't showing up.  I have the <code>canvas</code> <code>display:</code> set to <code>none</code> but after running a function it is changed to display of block, so I'm not sure if that would interfere with it or not. Anyway, here is the code:</p>
  
  <pre><code>var gameContext = canvas.getContext("2d");
  function draw() {
      gameContext.beginPath();
      gameContext.lineWidth="6";
      gameContext.strokeStyle="red";
      gameContext.rect(5,5,290,140);  
      gameContext.stroke();
  }
  draw();
  </code></pre>
  
  <p>Thanks for any help at all, it helps a lot!</p>