Per your post, to reproduce the gradient in SVG, define your linear gradient in the svg
element.
See the snippet below (the css only applies to the html divs).
div {
height: 100px;
width: 100px;
display: inline-block;
background-color: red;
background-image: linear-gradient(red, orange);
}