SVG Attribute reference
SVG elements can be modified using attributes that specify details about exactly how the element should be handled or rendered.
Below is a list of all of the attributes available in SVG along with links to reference documentation to help you learn which elements support them and how they work.
SVG attributes A to Z
>A
B
C
D
E
F
G
H
I
K
L
M
N
O
P
R
S
scaleseedshape-renderingsideslopespacingspecularConstantspecularExponentspreadMethodstartOffsetstdDeviationstitchTilesstop-colorstop-opacitystrokestroke-dasharraystroke-dashoffsetstroke-linecapstroke-linejoinstroke-miterlimitstroke-opacitystroke-widthstylesurfaceScalesystemLanguage
T
U
V
W
X
Y
Z
SVG attributes by category
>Core attributes
The core attributes are global attributes.
Conditional processing attributes
The conditional processing attributes control whether or not the element on which it appears is processed.
XLink attributes
The XLink attributes can reference resources.
xlink:hrefDeprecatedxlink:typeDeprecatedxlink:roleDeprecatedxlink:arcroleDeprecatedxlink:titleDeprecatedxlink:showDeprecatedxlink:actuateDeprecated
Presentation attributes
All SVG presentation attributes can be used as CSS properties.
Note:
Whether these attributes are presentation attributes depends on the element on which they are set. For example, x is a presentation attribute for <circle>, but not for <tspan>; it's the coordinate of the starting point of the text baseline, or the x coordinate of each individual glyph if a list of values is provided.
alignment-baselinebaseline-shiftclipclip-pathclip-rulecolorcolor-interpolationcolor-interpolation-filterscursorcxcyddirectiondisplaydominant-baselinefillfill-opacityfill-rulefilterflood-colorflood-opacityfont-familyfont-sizefont-size-adjustfont-stretchfont-stylefont-variantfont-weightglyph-orientation-horizontalglyph-orientation-verticalheightimage-renderingletter-spacinglighting-colormarker-endmarker-midmarker-startmaskmask-typeopacityoverflowpointer-eventsrrxryshape-renderingstop-colorstop-opacitystrokestroke-dasharraystroke-dashoffsetstroke-linecapstroke-linejoinstroke-miterlimitstroke-opacitystroke-widthtext-anchortext-decorationtext-overflowtext-renderingtransformtransform-originunicode-bidivector-effectvisibilitywidthwhite-spaceword-spacingwriting-modexy
Filters attributes
Animation attributes
Event attributes
All HTML and SVG elements support event handler attributes defined on the GlobalEventHandlers mixin.
While event handler attributes, like onblur and onauxclick, apply to all elements, they may not have any effect. For example, the oncuechange attribute can be applied to any element, but it is only relevant to the <track> element.
Event handler attributes are discouraged, considered unsafe, and may be blocked by content security policies (CSP). Use the event name withing an addEventListener() method instead.