SVGdefs


Syntax

  • <defs> ... defined elements ... </defs>

Parameters

ParameterDetails
defsThe defs element has no parameters

Remarks

The <defs> element is used as a container element for elements that are intended to be used solely by reference and not rendered directly. Elements that would normally be rendered (e.g. <rect>, <circle>) that are declared inside a <defs> block are treated as if their style included display:none.

Although it's not strictly necessary, the SVG spec. recommends putting all gradient, filter, pattern, mask, symbol, and marker definitions within a defs block.