+ 3

How can I make a polygon with svg?

Like a penthagon

10th Jun 2019, 6:53 PM
Ferry
Ferry - avatar
2 Answers
+ 6
<svg width="2000" height="500"> <polygon points="100 100,200 200,300 0" style="fill:red;stroke:blue;"/> </svg>
15th Jun 2019, 10:19 AM
Rozhan.mkm
Rozhan.mkm - avatar
+ 2
Use SVG's polygon tag. This introduces it: https://www.w3schools.com/graphics/svg_polygon.asp Here is someone else's example on Sololearn using it to draw a pentagon: https://code.sololearn.com/WOC51g344Yka/#html
12th Jun 2019, 2:39 AM
Josh Greig
Josh Greig - avatar