HTML Canvas Image
- Previous Page Canvas Text
- Next Page Clock Introduction
Canvas - Image
To draw an image on the canvas, use the following method:
- drawImage(image,x,y)
Example

JavaScript:
window.onload = function() { const canvas = document.getElementById("myCanvas"); const ctx = canvas.getContext("2d"); const img = document.getElementById("tulip"); ctx.drawImage(img, 10, 10); }
See also:
- Previous Page Canvas Text
- Next Page Clock Introduction