VOOZH about

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

⇱ SVG stroke Attribute - GeeksforGeeks


  • Courses
  • Tutorials
  • Interview Prep

SVG stroke Attribute

Last Updated : 31 Mar, 2022

The stroke attribute is an attribute defining the color used to paint the outline of the shape

Syntax:

stroke= "color"

Attribute Values:

  • paint: The color in which we want to paint the element.

We will use the stroke attribute for setting the color of the element.

Example 1: In this example, we will use the stroke attribute for setting the color of circle element.

Output:

👁 Image

Example 2: In this example, we will use the stroke attribute for setting the color of rect element.

Output:

👁 Image
Comment