The <canvas> element

A rectangular region of the webpage which displays an image that is drawn by JavaScript code. Usually used for games, animated graphs, or other interactive website features.

Full list of attributes

All the usual HTML global attributes are available

height
The height of the box that should be created, in CSS pixels.
width
The width of the box that should be created, in CSS pixels. Note that the width and height actually determine the resolution that the resulting image will be stored at.

Further information

The Web Design Academy Contact us

By form

By Phone

+44 (0)113 234 4611

By email

enquiries@thewebdesign.academy

By snail mail

Suite 3 15 South Parade Leeds LS1 5PQ United Kingdom