HTML Tag: canvas
A canvas onto which JavaScript can be used to paint all manner of dynamic images such as graphs, animated sprites, or daft cat pictures.
Content, which should be provided and should represent the intended rendition of the canvas, is treated as fallback content that will be called into play if canvas
is not understood (such as in older browsers) or if JavaScript is not enabled.
Optional Attributes
Attribute | Description | Possible values |
---|---|---|
width |
Width in pixels. | Number. Default is 300 . |
height |
Height in pixels. | Number. Default is 150 . |
Global attributes |
Example
<canvas id="wittykitty" width="800" height="450">
<!-- Here be fall-back content -->
</canvas>