SVG Polygon in HTML
What is a polygon?
As we know, Polygon means a shape that contains many angles. Fortunately, SVG allows us to create polygons.
The SVG < polygon > element is used to create a shape that contains at least three sides.
Essential attributes in < polygon > tag are:-
- The points attribute defines the x and y coordinates for each corner of the polygon. We can add multiple x and y coordinates by just separating them from commas.
- The style attribute defines different styling properties including stroke, stroke-width, fill, etc.