I'm new to svg. I've looked at w3schools, MDN, css-tricks and a bunch of youtube tuts. I'm stiil confused about using css with svg. Do I have to put the svg directly into the html? I would like to import the svg and still have the css work.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<link rel="stylesheet" href="test.css">
<!-- css moved to external file test.css
<style>
#down-glyph {
fill: red;
}
#down-glyph:hover {
fill: green;
}
</style>
-->
</head>
<body>
<!-- svg copied from 'downbracket.svg' this works -->
<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 129 65'>
<polygon id='down-glyph' fill="#e8e899" points=" 0.0,12.419 64.362,65.306 128.732,12.419 108.151,0.944 64.362,35.347 20.573,0.944"/>
</svg>
<!-- svg loads but styling not applied this way
<object id='scroll-down' class='scroll-button' type="image/svg+xml" data="downbracket.svg">alternate here</object>
-->
</body>
</html>