VOOZH about

URL: https://www.geeksforgeeks.org/html/svg-defs-element/

⇱ SVG defs Element - GeeksforGeeks


  • Courses
  • Tutorials
  • Interview Prep

SVG defs Element

Last Updated : 7 Aug, 2020

The <defs> 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 <defs> element are not rendered directly they are needed to be called by <use> element to render them on the browser.

Syntax:

<defs></defs>

Property values: It does not have any property values.

Below given are a few examples of the above function.

Example 1: When <defs> is not called thus it is not executed.

Output:

👁 Image

Example 2:

Output:

👁 Image
Comment
Article Tags: