This is a self Q&A of a handy piece of code I came up with.
Currently, there isn\'t an easy way to embed an SVG image and then have access to the SVG elements vi
If we have a greater number of such svg images we can also take the help of font-files. Sites like https://glyphter.com/ can get us a font file from our svgs.
E.g.
@font-face { font-family: 'iconFont'; src: url('iconFont.eot'); } #target{ color: white; font-size:96px; font-family:iconFont; }