Interactive online courses HTML Academy
2026-03-09 10:58 Diff

In SVG, you can draw not only quadrilaterals, but also polygons. You can do this by using the tag polygon. Code example:

<polygon points="70,5 90,41 136,48 103,80 111,126 70,105 29,126 36,80 5,48 48,41"/>

And the result:

The coordinates for the shape vertices are assigned using the points attribute. Each coordinate is assigned by specifying the x andy coordinates. Coordinates at points cannot be specified as a percentage.