You can nest SVG elements
Written by Stefan Judis
- Published at
- Updated at
- Reading time
- 1min
This post is part of my Today I learned series in which I share all my web development learnings.
Recently I heard in a podcast that nested SVGs are valid. 😲
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<!-- some SVG content -->
<svg>
<!-- some inner SVG content -->
</svg>
<svg>
What a suprise! After googling around a bit, I found two fantastic posts by Sara Soueidan.
Go, read and bookmark them! Sara's articles are always excellent.
If you enjoyed this article...
Join 5.5k readers and learn something new every week with Web Weekly.
Reply to this post and share your thoughts via good old email.