programming-examples/html/Basics/Embedding canvas into HTML documents.html
2019-11-18 14:44:36 +01:00

17 lines
448 B
HTML

<!DOCTYPE html>
<html subLang="en">
<head>
<meta charset="UTF-8">
<title>HTML5 Canvas</title>
<script type="text/javascript">
window.onload = function(){
var canvas = document.getElementById("myCanvas");
var context = canvas.getContext("2d");
// draw stuff here
};
</script>
</head>
<body>
<canvas id="myCanvas" width="300" height="200"></canvas>
</body>
</html>