fill
Sets the color or pattern used to paint the inside of an SVG shape. It is the SVG equivalent of the 'background-color' property for regular HTML elements.
Quick example
svg path {
fill: #ff6347;
/* paints the SVG shape with a Tomato color */
} Quick facts
Initial value
blackInherited
Yes
Applies to
a subset of SVG elements (shapes and text)
Animation type
byComputedValueType
fill Browser Support
Widely available Since 2020 96% global usage
This feature is well established and works across many devices and browser versions. It has been available across browsers since 2020.
Safe to use without fallbacks.
1+
3+
4+
15+