Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

canvas tag html

//HTML
<canvas id="canv"></canvas>

//Javascript
var canvas = document.getElementById("canv");
canvas.width = canvas.height = 100;
var ctx = canvas.getContext("2d");
ctx.fillStyle = "red";
ctx.fillRect(10, 10, 80, 80);
 
PREVIOUS NEXT
Tagged: #canvas #tag #html
ADD COMMENT
Topic
Name
8+6 =