VOOZH about

URL: https://www.geeksforgeeks.org/html/svg-stroke-dasharray-attribute/

⇱ SVG stroke-dasharray Attribute - GeeksforGeeks


  • Courses
  • Tutorials
  • Interview Prep

SVG stroke-dasharray Attribute

Last Updated : 31 Mar, 2022

The stroke-dasharray attribute is a presentation attribute defining the pattern of dashes used to paint the outline of the shape.


Syntax:

stroke-dasharray="number pattern"

Attribute Values:

  • dasharray: The pattern stroke that will have.

We will use the stoke-dasharray attribute for setting the pattern of the stroke.

Example 1: In this example we will use the stroke-dasharray attribute for setting the pattern of line.

Output:

👁 Image

Example 2: In this example we will use the stroke-dasharray attribute for setting the pattern of circle

Output:

👁 Image
Comment