📡 You're offline — showing cached content
New version available!
Quick Access
Tutorials HTML Fundamentals SVG in HTML

SVG in HTML

5 min read
Inline SVG embeds vector graphics directly in HTML. Draw shapes with circle, rect, line, and path elements. SVG scales to any size without pixelation. Style with CSS and use currentColor for icons that inherit text colour.

Inline SVG

<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg">
    <circle cx="50" cy="50" r="40" fill="blue" />
    <rect x="10" y="10" width="30" height="30" fill="red" />
    <line x1="0" y1="0" x2="100" y2="100" stroke="green" />
    <text x="20" y="80" font-size="14">Hello</text>
</svg>