<canvas id="testCanvas" width="200" height="100" style="border:1px solid gray;">
trình duyệt của bạn không hỗ trợ canvas </canvas>

<script>
var c = document.getElementById("testCanvas");
var ctx = c.getContext("2d");
ctx.moveTo(0,0);
ctx.lineTo(200,100);
ctx.stroke();
</script>

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

This Pen doesn't use any external JavaScript resources.