Drawing an Arc
<!DOCTYPE html> <html> <head> <style> #canvas { /*from w ww .j av a 2s . c o m*/ border:1px solid #03F; background:#CFC; } </style> </head> <body> <canvas id="canvas" width="640" height="480"></canvas> <script> let canvas = document.getElementById('canvas').getContext('2d'); canvas.arc(100, 100, 40, 5, 1, true); canvas.strokeStyle = '#000'; canvas.lineWidth = 5; canvas.stroke(); </script> </body> </html>