<circle>
– Draws a circle
<defs>
– Define elements for reference
<ellipse>
– Draws an ellipse
<g>
– Groups elements
<linearGradient>
– Defines a linear gradient
<path>
– Draws a generic, free-form shape
<rect>
– Draws a rectangle
<svg width="100%" height="100%" viewBox="0 0 380 500">
<g id="shapes">
<rect x="20" y="20" width="140" height="140" fill="#f00"/>
<circle cx="90" cy="253" r="70" fill="#f00"/>
<path d="M90,346l70,140l-140,0l70,-140Z" fill="#f00"/>
</g>
<g id="paths">
<path
d="M 220 20 L 360 20 L 360 160 L 220 160 L 220 20 Z"
fill="#0f0"/>
<path
d="M220,253c0,-38.66 31.34,-70 70,-70c38.66,0 70,31.34
70,70c0,38.66 -31.34,70 -70,70c-38.66,0 -70,-31.34 -70,-70Z"
fill="#0f0"/>
<path d="M290,346l70,140l-140,0l70,-140Z" fill="#0f0"/>
</g>
</svg>
<svg viewBox="0 0 380 500">
<g fill="red">
<path d="M20 20h140v140H20z"/>
<circle cx="90" cy="253" r="70"/>
<path d="M90 346l70 140H20l70-140z"/>
</g>
<g fill="#0f0">
<path d="M220 20h140v140H220V20zM220 253c0-38.66 31.34-70
70-70s70 31.34 70 70-31.34 70-70 70-70-31.34-70-70zM290
346l70 140H220l70-140z"/>
</g>
</svg>
Supplied at 125kb
Optimised to 37kb
(49kb before optimising with svgo)
@stowball