SVG gradients are defined in the defs element and can be used as a fill or even a stroke (border) on a shape!

SVG Gradients: Fill & Stroke