type
The type attribute is a generic attribute and it has different meaning based on the context in which it's used.
The `type` attribute is a generic attribute and it has different meaning based on the context in which it's used.
- For the animateTransform element, it defines the type of transformation, whose values change over time.
- For the feColorMatrix element, it indicates the type of matrix operation. The keyword `matrix` indicates that a full 5x4 matrix of values will be provided. The other keywords represent convenience shortcuts to allow commonly used color operations to be performed without specifying a complete matrix.
- For the feFuncR, feFuncG, feFuncB, and feFuncA elements, it Indicates the type of component transfer function.
- For the feTurbulence element, it indicates whether the filter primitive should perform a noise or turbulence function.
- For the style and script elements, it defines the content type of the element.
You can use this attribute with the following SVG elements:
- animateTransform
- feColorMatrix
- feFuncA
- feFuncB
- feFuncG
- feFuncR
- feTurbulence
- script
- style
## Usage notes
### For the <animateTransform> elements
SVG element: animateTransform
<table class="properties">
<tbody>
<tr>
<th scope="row">Categories</th>
<td><em>None</em></td>
</tr>
<tr>
<th scope="row">Value</th>
<td>
<strong><code>translate</code></strong> | <code>scale</code> |
<code>rotate</code> | <code>skewX</code> | <code>skewY</code>
</td>
</tr>
<tr>
<th scope="row">Animatable</th>
<td>No</td>
</tr>
<tr>
<th scope="row">Normative document</th>
<td>
<a
href="https://svgwg.org/specs/animations/#AnimateTransformElementTypeAttribute"
>Scalable Vector Graphics (SVG) 2</a
>
</td>
</tr>
</tbody>
</table>
### For the <feColorMatrix> element
SVG element: feColorMatrix
<table class="properties">
<tbody>
<tr>
<th scope="row">Categories</th>
<td><em>None</em></td>
</tr>
<tr>
<th scope="row">Value</th>
<td>
<strong><code>matrix</code></strong> | <code>saturate</code> |
<code>hueRotate</code> | <code>luminanceToAlpha</code>
</td>
</tr>
<tr>
<th scope="row">Animatable</th>
<td>Yes</td>
</tr>
<tr>
<th scope="row">Normative document</th>
<td>
<a
href="https://drafts.csswg.org/filter-effects-1/#element-attrdef-fecolormatrix-type"
rel="external"
>Filter Effects Module Level 1</a
>
</td>
</tr>
</tbody>
</table>
### For the <feFuncR>, <feFuncG>, <feFuncB>, and <feFuncA> elements
SVG elements: feFuncR, feFuncG, feFuncB, feFuncA
<table class="properties">
<tbody>
<tr>
<th scope="row">Categories</th>
<td><em>None</em></td>
</tr>
<tr>
<th scope="row">Value</th>
<td>
<code>identity</code> | <code>table</code> | <code>discrete</code> |
<code>linear</code> | <code>gamma</code>
</td>
</tr>
<tr>
<th scope="row">Animatable</th>
<td>Yes</td>
</tr>
<tr>
<th scope="row">Normative document</th>
<td>
<a
href="https://drafts.csswg.org/filter-effects-1/#element-attrdef-fecomponenttransfer-type"
rel="external"
>Filter Effects Module Level 1</a
>
</td>
</tr>
</tbody>
</table>
### For the <feTurbulence> element
SVG element: feTurbulence
<table class="properties">
<tbody>
<tr>
<th scope="row">Categories</th>
<td><em>None</em></td>
</tr>
<tr>
<th scope="row">Value</th>
<td>
<code>fractalNoise</code> | <strong><code>turbulence</code></strong>
</td>
</tr>
<tr>
<th scope="row">Animatable</th>
<td>Yes</td>
</tr>
<tr>
<th scope="row">Normative document</th>
<td>
<a
href="https://drafts.csswg.org/filter-effects-1/#element-attrdef-feturbulence-type"
rel="external"
>Filter Effects Module Level 1</a
>
</td>
</tr>
</tbody>
</table>
### For the <style> and <script> elements
SVG elements: style, script
<table class="properties">
<tbody>
<tr>
<th scope="row">Categories</th>
<td><em>None</em></td>
</tr>
<tr>
<th scope="row">Value</th>
<td><media-type></td>
</tr>
<tr>
<th scope="row">Animatable</th>
<td>No</td>
</tr>
<tr>
<th scope="row">Normative document</th>
<td>
<a
href="https://w3c.github.io/svgwg/svg2-draft/interact.html#ScriptElementTypeAttribute"
rel="external"
>Scalable Vector Graphics (SVG) 2</a
><br /><a
href="https://w3c.github.io/svgwg/svg2-draft/styling.html#StyleElementTypeAttribute"
rel="external"
>Scalable Vector Graphics (SVG) 2</a
>
</td>
</tr>
</tbody>
</table>
Cite this
"type". MDN Web Docs. CC BY-SA 2.5 (MDN). https://developer.mozilla.org/en-US/docs/Web/SVG/Reference/Attribute/type