The <discard> SVG element allows authors to specify the time at which particular elements are to be discarded, thereby reducing the resources required by an SVG user agent. This is particularly useful to help SVG viewers conserve memory while displaying long-running documents.

The <discard> element may occur wherever the <animate> element may.

Usage context

CategoriesAnimation element
Permitted contentAny number of the following elements, in any order:
Descriptive elements


Global attributes

Specific attributes

  • begin
  • href (but note that <discard> has never supported xlink:href)


SVG Animations Level 2
# DiscardElement

Browser compatibility

BCD tables only load in the browser