HTML SVG

What is SVG?

SVG stands for Scalable Vector Graphics. It is used to draw shapes, icons, charts and graphics using XML-based code.

Basic SVG Example

<svg width="200" height="200">
  <circle cx="100" cy="100" r="50" fill="red" />
</svg>

Example

<svg width="200" height="200">
  <rect width="150" height="100" fill="blue" />
</svg>

Common SVG Shapes

Advantages of SVG

Important Tip

SVG is resolution-independent, so it looks sharp on all screen sizes.