HTML SVG Graphics

The Html <svg> element is used as a container for html SVG(Scalable Vector Graphics) Graphics . SVG Graphics is language based on XML for two dimensional graphics.

Syntax

<svg>
<shape and attributes-regarding-shape/>
</svg>
        <svg width="100" height="100">
            <circle cx="50" cy="50" r="40" stroke="black" stroke-width="5" fill="pink" />
        </svg>
HTML SVG Graphics Draw Circle

Rounded Rectangle

<svg width="400" height="100">
  <rect x="50" y="10" rx="20" ry="20" width="200" height="80" 
  style="fill:pink;stroke-width:2;stroke:black" />
Sorry, your browser does not support inline SVG.
</svg>
HTML SVG Graphics Draw Rectangle

HTML SVG Graphics: SVG Star

 <svg width="300" height="200">
            <polygon points="100,10 40,198 190,78 10,78 160,198" style="fill:pink;stroke:black;stroke-width:5;fill-rule:evenodd;" />
        </svg>
HTML SVG Graphics Draw star

HTML Canvas is also used for graphics. Visit HTML Canvas for more details.