SVG Polygon
How to Draw a Polygon?
The <polygon>
SVG element that draws a closed shape consisting of a set of connected straight line segments. The last point is connected to the first point.
In this example, we will draw a six-sided (Hexagon) polygon by using <polygon>
SVG element.
Example
How to Draw a Lightning?
In this example, we will draw a lightning image by using <polygon>
SVG element.
How to Draw a Star?
In this example, we will draw a star image by using <polygon>
SVG element.
Attributes Value
Attribute | Explanation |
---|---|
points | This attribute specifies the list of points required to draw the polygon. |
Reminder
Hi Developers, we almost covered 91% of SVG Tutorials with examples for quick and easy learning.
We are working to cover every Single Concept in SVG.
Please do google search for:
Join Our Channel
Join our telegram channel to get an instant update on depreciation and new features on HTML, CSS, JavaScript, jQuery, Node.js, PHP and Python.
This channel is primarily useful for Full Stack Web Developer.