Source Code:
(back to article)
<!DOCTYPE html> <html> <head> <title>Title of the Document</title> <style type="text/css"> canvas { border: 1px solid black; } </style> </head> <body onload="paint()"> <script type="text/javascript"> function paint() { let canvas = document.getElementById("canvas"); let ctx = canvas.getContext("2d"); ctx.beginPath(); ctx.arc(100, 75, 50, 0, 2 * Math.PI); ctx.stroke(); } </script> <canvas id="canvas" width="250" height="250"></canvas> </body> </html>
Result:
Report an issue