SVG Boilerplate

a kick-arse default to put the wow back into the web

SVG Boilerplate is a simple, straightforward, and functional template to embed or inline SVG content (including in text/html) that works with browsers all the way down to IE6.

It is built to be compatible with HTML5 Boilerplate so that you can just paste the parts you want there if you want to — but it is also intended to be used standalone.

For top notch browsers, it will do nothing — all you get from it is a simple way of remembering some of those basic annoying attributes on the root SVG element. For browsers that don't support SMIL, it'll inject FakeSMIL so that animations work. For browsers that still don't support HTML5 parsing, it makes it possible to use SVG inline in HTML (in other words, no need to go to XHTML and application/xhtml+xml) with ForceSVG. And for the antiquities that still roam the interwebs, it relies on SVGWeb to kick in.

WARNING: the current version is alpha, and has not been tested anywhere near as much as it should. Use it at your own risk.

If you're interested, I will be posting updates to my Twitter account. If you wish to contribute, you can go fork the code on GitHub.

You can download the code either as a zip archive or as a tar ball.