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 nesting SVGs is 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>
I was surprised and started googling. I found two fantastic posts by Sara Soueidan.
This TIL post includes "only" two bookmarks for myself. Go, read and bookmark them! The Sara's articles are always excellent.
Was this TIL post helpful?
Yes? Cool! You might want to check out Web Weekly for more quick learnings. The last edition went out 18 days ago.
Yes? Cool! You might want to check out Web Weekly for more quick learnings. The last edition went out 18 days ago.