Canvas Tutorials

Canvas Methods and Properties

HTML canvas stroke() Method

HTML canvas stroke() Method



The stroke() method is used to draw the path that is defined by moveTo() and lineTo() methods. We have to use strokeStyle property to change its default color.




Its default color is black.




Its syntax is:- context.stroke();

Code Explanation

All Tutorials related to Canvas Methods and Properties

All Sections related to Canvas