<h2>Example of SVG Linear Gradient </h2>
<h3>stop-offset defines the position of color starts and stop-color defines combination of colors</h3>
<svg height="250" width="300" >
<linearGradient id="gradval" x1="0%" y1="0" x2="0%" y2="100%">
<stop offset="25%" stop-color="cyan" stop-opacity="0.5"/>
<stop offset="75%" stop-color="dodgerblue" />
<rect x="50" y="20" width="200" height="200" rx="30" fill="url(#gradval)"/>
<h2>Example of SVG Radial Gradient </h2>
<svg height="300" width="300" >
<radialGradient id="gradval1" x1="0%" y1="0" x2="0%" y2="100%">
<stop offset="25%" stop-color="black" />
<stop offset="75%" stop-color="hotpink" />
<rect x="50" y="20" width="200" height="200" rx="30" fill="url(#gradval1)"/>