Home Tutorials HTML Tutorial SVG
SVG

SVG


45. SVG

SVG is used to create scalable vector graphics directly in HTML. It is often included in advanced HTML topics alongside canvas.

Syntax

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

Example

<svg width="120" height="120">
    <circle cx="60" cy="60" r="40" fill="green" />
</svg>

Output

A green circle is displayed.
Example

🏋️ Test Yourself With Exercises

Take our quiz on SVG to test your knowledge.

Browse Quizzes »