Search code examples
javascripthtmlhtml5-canvas

What is the HTML5 canvas?


I'm a little confused to what HTML5 canvas is. I've been told it is JavaScript, but it seems to be a much bigger deal?

  1. What makes it different than javascript?

  2. Why is it so amazing?

  3. Does it do other things than JavaScript?


Solution

  • I suggest you read this article HTML5 Canvas - the basics
    edit: This link is ancient, there are several better resources a web-search away /OP

    But in short. It does not replace javascript.

    HTML 5 canvas gives you an easy and powerful way to draw graphics using JavaScript. For each canvas element you can use a "context" (think about a page in a drawing pad), into which you can issue JavaScript commands to draw anything you want. Browsers can implement multiple canvas contexts and the different APIs provide the drawing functionality.