canvas (HTML5)

The Canvas (<canvas>) HTML element can be used to draw graphics via scripting (usually JavaScript).

Properties & Events

KeyDescriptionAvailability
heightThe height of the coordinate space in CSS pixels.
chrome 1.0safari 1.0Firefox 1.0ie 1.0opera 1.0
width The width of the coordinate space in CSS pixels.
chrome 1.0safari 1.0Firefox 1.0ie 1.0opera 1.0

Examples having uses of: 'canvas'

1 votes
10k views

HTML5 canvas

The <canvas> tag is used to draw graphics, on the fly, via scripting (usually JavaScript). The <canvas> tag is only a container for graphics, you must use a script to actually draw the graphics.
1 votes
2k views

HTML5 Canvas Image

The drawImage method allows you to insert other images (img and canvas elements) into your canvas context. To draw an image using HTML5 Canvas, we can use the drawImage() method which requires an image object and a destination point. The destination point is relative to the top left corner of the image.
0 votes
2k views

HTML5 Canvas Text

To align HTML5 Canvas text, we can use the textAlign property of the canvas context, which can be set to start, end, left, center, or right. Unless otherwise specified, the textAlign property is defaulted to left.
1 votes
1k views

HTML5 canvas 2D

HTML5 canvas populated with one filled rectangle and one painted stroke.