The canvas tag
The canvas
tag defines a JavaScript drawing board. By default, this board is just a white rectangle, but it can be styled with CSS.
Example
Let's create a drawing board and style it:
<canvas></canvas>
canvas {
width: 300px;
height: 200px;
border: 1px solid black;
}
:
See also
-
tag
img
,
which defines the image -
property
background-image
,
which sets the background image