HTML Canvas

HTML Canvas

<!DOCTYPE html>
<html>
<head>

</head>
<body>

<p>Canvas</p>
<canvas id="myCanvas" height=300 width=500 style="border:2px solid;">
</canvas>

<script>
var canvas = document.getElementById("myCanvas");
var ctx = canvas.getContext("2d");
ctx.moveTo(0,100);1`
ctx.lineTo(500,100);
ctx.moveTo(0,200);
ctx.lineTo(500,200);
ctx.stroke();
</script>

</body>
</html>

Click here for download .html text file 

Comments

Post a Comment

Popular posts from this blog

C++ Practice Program

Cloud Computing Important Question-Answer for University Exam

Software Testing Gujarat University Important Questions For Exam