d
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
calcMode
cap-height (en-US)
class (en-US)
clip (en-US)
clipPathUnits (en-US)
clip-path (en-US)
clip-rule (en-US)
color (en-US)
color-interpolation (en-US)
color-interpolation-filters (en-US)
color-profile (en-US)
color-rendering
contentScriptType (en-US)
contentStyleType (en-US)
crossorigin (en-US)
cursor (en-US)
cx
cy (en-US)
D
E
F
fill (en-US)
fill-opacity (en-US)
fill-rule (en-US)
filter (en-US)
filterRes (en-US)
filterUnits (en-US)
flood-color (en-US)
flood-opacity (en-US)
font-family (en-US)
font-size (en-US)
font-size-adjust (en-US)
font-stretch (en-US)
font-style (en-US)
font-variant (en-US)
font-weight (en-US)
format (en-US)
from (en-US)
fr (en-US)
fx (en-US)
fy (en-US)
G
H
I
K
L
M
N
O
P
panose-1 (en-US)
paint-order (en-US)
path (en-US)
pathLength (en-US)
patternContentUnits (en-US)
patternTransform (en-US)
patternUnits (en-US)
ping
pointer-events (en-US)
points (en-US)
pointsAtX (en-US)
pointsAtY (en-US)
pointsAtZ (en-US)
preserveAlpha (en-US)
preserveAspectRatio (en-US)
primitiveUnits (en-US)
R
S
scale (en-US)
seed (en-US)
shape-rendering (en-US)
slope (en-US)
spacing (en-US)
specularConstant (en-US)
specularExponent (en-US)
speed
spreadMethod (en-US)
startOffset (en-US)
stdDeviation (en-US)
stemh (en-US)
stemv (en-US)
stitchTiles (en-US)
stop-color (en-US)
stop-opacity (en-US)
strikethrough-position (en-US)
strikethrough-thickness (en-US)
string (en-US)
stroke (en-US)
stroke-dasharray (en-US)
stroke-dashoffset (en-US)
stroke-linecap (en-US)
stroke-linejoin (en-US)
stroke-miterlimit (en-US)
stroke-opacity (en-US)
stroke-width (en-US)
style (en-US)
surfaceScale (en-US)
systemLanguage (en-US)
T
U
V
W
X
Y
Z
SVG attributes by category
Generic attributes
- Core attributes
-
id (en-US)
,lang (en-US)
,tabindex (en-US)
,xml:base (en-US)
,xml:lang (en-US)
,xml:space (en-US)
- Style attributes
-
class (en-US)
,style (en-US)
- Conditional processing attributes
-
requiredExtensions
,requiredFeatures (en-US)
,systemLanguage (en-US)
.
XLink attributes
Presentation attributes
Note: All SVG presentation attributes can be used as CSS properties.
alignment-baseline (en-US)
baseline-shift (en-US)
clip (en-US)
clip-path (en-US)
clip-rule (en-US)
color (en-US)
color-interpolation (en-US)
color-interpolation-filters (en-US)
color-profile (en-US)
color-rendering
cursor (en-US)
direction (en-US)
display (en-US)
dominant-baseline (en-US)
enable-background (en-US)
fill (en-US)
fill-opacity (en-US)
fill-rule (en-US)
filter (en-US)
flood-color (en-US)
flood-opacity (en-US)
font-family (en-US)
font-size (en-US)
font-size-adjust (en-US)
font-stretch (en-US)
font-style (en-US)
font-variant (en-US)
font-weight (en-US)
glyph-orientation-horizontal (en-US)
glyph-orientation-vertical (en-US)
image-rendering (en-US)
kerning (en-US)
letter-spacing (en-US)
lighting-color (en-US)
marker-end (en-US)
marker-mid (en-US)
marker-start (en-US)
mask (en-US)
opacity (en-US)
overflow (en-US)
pointer-events (en-US)
shape-rendering (en-US)
stop-color (en-US)
stop-opacity (en-US)
stroke (en-US)
stroke-dasharray (en-US)
stroke-dashoffset (en-US)
stroke-linecap (en-US)
stroke-linejoin (en-US)
stroke-miterlimit (en-US)
stroke-opacity (en-US)
stroke-width (en-US)
text-anchor (en-US)
text-decoration (en-US)
text-rendering (en-US)
transform (en-US)
transform-origin (en-US)
unicode-bidi (en-US)
vector-effect (en-US)
visibility (en-US)
word-spacing (en-US)
writing-mode (en-US)
Filters attributes
- Filter primitive attributes
height (en-US)
,result (en-US)
,width (en-US)
,x (en-US)
,y (en-US)
- Transfer function attributes
type (en-US)
,tableValues (en-US)
,slope (en-US)
,intercept (en-US)
,amplitude (en-US)
,exponent (en-US)
,offset
Animation attributes
- Animation target element attributes
href (en-US)
- Animation attribute target attributes
attributeType (en-US)
,attributeName (en-US)
- Animation timing attributes
begin (en-US)
,dur (en-US)
,end (en-US)
,min (en-US)
,max (en-US)
,restart (en-US)
,repeatCount (en-US)
,repeatDur (en-US)
,fill (en-US)
- Animation value attributes
calcMode
,values
,keyTimes
,keySplines (en-US)
,from (en-US)
,to (en-US)
,by (en-US)
,autoReverse
,accelerate
,decelerate
- Animation addition attributes
additive (en-US)
,accumulate (en-US)
Event attributes
- Animation event attributes
-
onbegin
,onend
,onrepeat
- Document event attributes
-
onabort
,onerror
,onresize
,onscroll
,onunload
- Global event attributes
-
oncancel
,oncanplay
,oncanplaythrough
,onchange
,onclick
,onclose
,oncuechange
,ondblclick
,ondrag
,ondragend
,ondragenter
,ondragleave
,ondragover
,ondragstart
,ondrop
,ondurationchange
,onemptied
,onended
,onerror
,onfocus
,oninput
,oninvalid
,onkeydown
,onkeypress
,onkeyup
,onload
,onloadeddata
,onloadedmetadata
,onloadstart
,onmousedown
,onmouseenter
,onmouseleave
,onmousemove
,onmouseout
,onmouseover
,onmouseup
,onmousewheel
,onpause
,onplay
,onplaying
,onprogress
,onratechange
,onreset
,onresize
,onscroll
,onseeked
,onseeking
,onselect
,onshow
,onstalled
,onsubmit
,onsuspend
,ontimeupdate
,ontoggle
,onvolumechange
,onwaiting
- Graphical event attributes
-
onactivate
,onfocusin
,onfocusout