files/en-us/web/svg/reference/element/radialgradient/index.md
The <radialGradient> SVG element lets authors define radial gradients that can be applied to fill or stroke of graphical elements.
[!NOTE] Don't be confused with CSS {{cssxref('gradient/radial-gradient', 'radial-gradient()')}} as CSS gradients can only apply to HTML elements where SVG gradient can only apply to SVG elements.
{{svginfo}}
50%; Animatable: yes50%; Animatable: yes0%; Animatable: yescx; Animatable: yescy; Animatable: yescx, cy, r, fx, fy, fr
Value type: userSpaceOnUse | objectBoundingBox; Default value: objectBoundingBox; Animatable: yes<radialGradient> element that will be used as a template.
Value type: <URL>; Default value: none; Animatable: yes50%; Animatable: yespad | reflect | repeat; Default value: pad; Animatable: yesThis element implements the {{domxref("SVGRadialGradientElement")}} interface.
html,
body,
svg {
height: 100%;
}
<svg
viewBox="0 0 10 10"
xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink">
<defs>
<radialGradient id="myGradient">
<stop offset="10%" stop-color="gold" />
<stop offset="95%" stop-color="red" />
</radialGradient>
</defs>
<!-- using my radial gradient -->
<circle cx="5" cy="5" r="4" fill="url('#myGradient')" />
</svg>
{{EmbedLiveSample('Example', 150, '100%')}}
{{Specifications}}
{{Compat}}