Check out example codes for "Is it a good idea to use .svg images in web design?". It will help you in understanding the concepts better.

Code Example 1

Because SVG files are vector graphics instead of pixel-based 
raster images, they can be resized without losing any image 
quality. This is especially helpful when you are creating 
responsive websites that need to look good and work well across 
a wide range of screen sizes and devices.
Mar 30, 2019

That said, yes, you can use vector based images online. 
However, support isn't nearly as much as your good ol' raster 
formats (png, gif, jpg). The main options for vector imagery 
on a web site would be SVG and Flash.

Learn ReactJs, React Native from akashmittal.com