SVG defs Element (original) (raw)
Last Updated : 7 Aug, 2020
The in SVG is used whenever we want a particular element to render only when required or when it is called. objects that are created inside element are not rendered directly they are needed to be called by element to render them on the browser.
Syntax:
Property values: It does not have any property values.
Below given are a few examples of the above function.
Example 1: When is not called thus it is not executed.
HTML `
Document
No Output only svg of size 100*100 is visible
and no circle stroke will be rendered
`
Output:
Example 2:
HTML `
Document`
Output: