scrimba
HTML5 | Web development Bootcamp
Web development 30 Days Course - #HTML5 #12
Go Pro!Bootcamp

Bootcamp

Study group

Collaborate with peers in your dedicated #study-group channel.

Code reviews

Submit projects for review using the /review command in your #code-reviews channel

Web development 30 Days Course - #HTML5 #12
AboutCommentsNotes
Web development 30 Days Course - #HTML5 #12
Expand for more info
index.html
run
preview
console
<!DOCTYPE html>
<html lang="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");
context.moveTo(50, 150);
context.lineTo(250, 50);
context.stroke();
};
</script>
</head>
<body>
<canvas id="myCanvas" width="300" height="200"></canvas>
</body>
</html>
Console
index.html
-3:54