HTML 5: The Markup Language

canvascanvas for dynamic graphics # T

The canvas element represents a resolution-dependent bitmap canvas, which can be used for dynamically rendering of images such as game graphics, graphs, or other images.

Content model #

canvas.elem.flow =
(normal-character-data & common.elem.flow*) & canvas.attrs
canvas.elem.phrasing =
(normal-character-data & common.elem.phrasing*) & canvas.attrs

Attribute model #

Element-specific attributes #

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

Tag omission #

A canvas element must have both a start tag and an end tag.

Permitted contexts #