Canvas Tutorials

Canvas Methods and Properties

HTML canvas strokeStyle Property

HTML canvas strokeStyle Property



The strokeStyle property sets or returns the color, gradient, or pattern used for strokes.




Its syntax is- context.strokeStyle = "color";


Further Explanation:-


Value Description
color A CSS color value indicates the stroke color of drawing. Default value is #000000
gradient A gradient object used to create a gradient stroke
pattern pattern object used to create a pattern stroke

Code Explanation

All Tutorials related to Canvas Methods and Properties

All Sections related to Canvas