Once we have what we are calling our "defs block" of SVG - that chunk of SVG that defines all the things we want to draw later - where do we put it? So far we've been putting it directly into the HTML, and that absolutely works. If we leave it at the top of the page, say just after the opening <body> tag:
<!-- include svg defs here -->
That will work great in all browsers that support SVG.
In this video we look at some basic testing of all this, and then look at some real-world websites that are using this system and how/where they insert the svg defs block.
I like the term "SVG defs block" - just so we can call it something that has a specific purpose but doesn't really have an official name. But, you don't always need to actually use a <defs> tag. When you use <symbol>s, those don't render on their own anyway, and indeed I don't think are supposed to be within <defs>. I've heard definitions of gradients in SVG are the same, and won't even work if they are in the <defs>. Regardless, it's still a "block of SVG code we're just defining to use later" so I'll likely keep calling it a "SVG defs block."