Online HTML Editor

<!DOCTYPE html> <html> <body> <canvas id="newCanvas" width="450" height="350" style="border:2px solid red;"></canvas> <script> var c = document.getElementById("newCanvas"); var ctx = c.getContext("2d"); ctx.beginPath(); ctx.moveTo(100, 200); ctx.lineTo(100, 100); ctx.strokeStyle = "blue"; ctx.stroke(); ctx.beginPath(); ctx.moveTo(30, 30); ctx.lineTo(20, 100); ctx.lineTo(70, 100); ctx.strokeStyle = "orange"; ctx.stroke(); </script> </body> </html>