A drawing board

canvas

The canvas element provides a clean slate for graphic drawings created with JavaScript drawing commands.

Example

div {
canvas #diagram
}
script {
const canvas = document.getElementById('diagram');
const ctx = canvas.getContext('2d');
ctx.fillStyle = 'red';
ctx.fillRect(20, 20, 150, 100);
}
A canvas element with JavaScript drawing commands.
0

semantax > media-embed > canvasA drawing board

🔗 🔎