References

Collection of references for web development.

HTML canvas tag

Description

The HTML <canvas> element is used to draw graphics with JavaScript.

Attributes

Attribute Value Description
height number Specifies the height of the element, default is measured in pixels.
width number Specifies the width of the element, default is measured in pixels.

Example

<canvas id="canvas" width="100" height="100"></canvas>