VOOZH about

URL: https://www.geeksforgeeks.org/html/svg-type-attribute/

⇱ SVG type Attribute - GeeksforGeeks


  • Courses
  • Tutorials
  • Interview Prep

SVG type Attribute

Last Updated : 23 Jul, 2025

The

type attribute

is a non-specific attribute that has a different meaning according to the context in which it used.

  • It defines the type of transformation, for the <animateTransform> element whose values change over time.
  • It defines the type of matrix operation, for the <feColorMatrix> element.
  • It defines the type of component transfer function, for the <feFuncG>, <feFuncB>, <feFuncR>, and <feFuncA> elements.
  • It defines whether the filter primitive should perform a turbulence or noise function, for the <feTurbulence> element.
  • It defines the content type of the element, for the <style> and <script> elements.

Syntax:

type = "value"

Attribute Values: The type attribute can be used with the following elements:

  • <animateTransform>: This element include type attribute with values like translate, scale, rotate, skewX, skewY.
  • <feColorMatrix> : This element include type attribute with values like matrix, saturate, hueRotate, luminanceToAlpha.
  • <feTurbulence>: This element include type attribute with values like fractalNoise, turbulence.
  •  <feFuncR>, <feFuncG>, <feFuncB>, and <feFuncA>: These elements include type attribute with values like identity, table, discrete, linear, gamma.

Below examples illustrate the use of the type attribute.

Example 1:

Output:

👁 GFG
Output


Example 2:

Output:

👁 Image
Comment