Make a star shape with HTML5 SVG

SVGWeb DevelopmentFront End ScriptsJavascript

Here is the HTML5 version of an SVG example that would draw a star using the <polygon> tag.

            position: relative;
            left: 50%;
            -webkit-transform: translateX(-40%);
            -ms-transform: translateX(-40%);
            transform: translateX(-40%);
      <meta charset="utf-8" />
      <h2 align = "center">HTML5 SVG Star</h2>
      <svg id = "svgelem" height = "200" xmlns = "">
      <polygon points = "100,10 40,180 190,60 10,60 160,180" fill = "red"/>
Published on 11-Apr-2018 11:27:43