This page is In Progress

Notice: The WebPlatform project, supported by various stewards between 2012 and 2015, has been discontinued. This site is now available on github.

canvas

Summary

The canvas element (<canvas>) provides scripts with a resolution-dependent bitmap canvas, which can be used for rendering graphs, game graphics, or other visual images on the fly, by using the associated canvas API.

Overview Table

DOM Interface
HTMLCanvasElement

HTML Attributes

  • height = non-negative integer
    The height of the canvas, in CSS pixels.
  • width = non-negative integer
    The width of the canvas, in CSS pixels.

Examples

<canvas width="800" height="600"></canvas>

Usage

 The canvas api is a useful resource for working with the canvas element.

Related specifications

HTML 5.1
W3C Working Draft
HTML 5
W3C Recommendation

See also

Related articles

Canvas