Met Canvas Stroke
# HTML canvas stroke() Method
[ Canvas Object](#)
## Example
Draw a path in the shape of the letter L in red:
YourbrowserdoesnotsupporttheHTML5canvastag.
JavaScriptοΌ
var c=document.getElementById("myCanvas");
var ctx=c.getContext("2d");
ctx.beginPath();
ctx.moveTo(20,20);
ctx.lineTo(20,100);
ctx.lineTo(70,100);
ctx.strokeStyle="red";
ctx.stroke();
[Try it Β»](#)
* * *
## Browser Support

Internet Explorer 9, Firefox, Opera, Chrome, and Safari support the stroke() method.
**Note:** Internet Explorer 8 and earlier versions do not support the
YouTip