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.
It is documented as part of the Scalable Vector Graphics specification.
Syntax
/* Usage Example */
svg path {
fill: #ff6347;
/* paints the SVG shape with a Tomato color */
}
/* Global values */
fill: inherit;
fill: initial;
fill: revert;
fill: revert-layer;
fill: unset;
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.
1+
3+
4+
15+