VOOZH about

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

⇱ SVG pathLength Attribute - GeeksforGeeks


  • Courses
  • Tutorials
  • Interview Prep

SVG pathLength Attribute

Last Updated : 31 Mar, 2022

The pathLength attribute defines the total length for the path, in user units. The elements which are using this attribute are: <circle>, <ellipse>, <line>, <path>, <polygon>, <polyline>, and <rect>

Syntax:

pathLength = number

Attribute Values: The pathLength attribute accepts the values mentioned above and described below

  • number: It is either a number with a fractional component or an integer.

Below examples illustrate the use of pathLength attribute.

Example 1:

Output:

👁 Image

Example 2:

Output:

👁 Image
Comment