Should I use
, , or
for loading SVG files into a page in a way similar to loading a
jpg>
My two cents: as of 2019, 93% of browsers in use (and 100% of the last two version of every one of them) can handle SVG in
elements:
Source: Can I Use
So we could say that there's no reason to use anymore.
However it's still has its pros:
When inspecting (e.g. with Chrome Dev Tools) you are presented with the whole SVG markup in case you wanted to tamper a bit with it and see live changes.
It provides a very robust fallback implementation in case your browser does not support SVGs (wait, but every one of them does!) which also works if the SVG isn't found. This was a key feature of XHTML2 spec, which is like betamax or HD-DVD
But there are also cons:
(tho it's perfectly safe to use it with
and use it inline too.
tag might keep your PWA from being really offline capable.