VOOZH about

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

⇱ SVG points Attribute - GeeksforGeeks


  • Courses
  • Tutorials
  • Interview Prep

SVG points Attribute

Last Updated : 31 Mar, 2022

The points attribute describes a list of points for the polygon or polyline element. If it contains an odd pair of coordinates, the last one will be ignored. 

Elements that are using this attribute:

  • <polyline> element
  • <polygon> element

Syntax:

points = numbers

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

  • numbers: It is the pair of integers separated by a comma and a group of coordinates separated by a space representing an X and a Y coordinate in the user coordinate system. Its default value is considered as none.

The below examples illustrate the use of the points attribute.

Example 1:

Output:

👁 Image

Example 2:

Output:

👁 Image
Comment