W3cubDocs

/SVG

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

T

U

V

W

X

Y

Z

SVG attributes by category

Generic attributes

Core attributes

Core attributes

id, lang, tabindex, xml:base, xml:lang, xml:space
Style attributes

Style attributes

class, style
Conditional processing attributes

requiredExtensions, requiredFeatures, systemLanguage.

Presentation attributes

Filters attributes

Filter primitive attributes
height, result, width, x, y
Transfer function attributes
type, tableValues, slope, intercept, amplitude, exponent, offset

Animation attributes

Animation target element attributes
href
Animation attribute target attributes
attributeType, attributeName
Animation timing attributes
begin, dur, end, min, max, restart, repeatCount, repeatDur, fill
Animation value attributes
calcMode, values, keyTimes, keySplines, from, to, by, autoReverse, accelerate, decelerate
Animation addition attributes
additive, accumulate

Event attributes

Animation event attributes

Animation event attributes

onbegin, onend, onrepeat

Document event attributes

Document event attributes

onabort, onerror, onresize, onscroll, onunload

Global event attributes

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

Graphical event attributes

onactivate, onfocusin, onfocusout

See also

© 2005–2023 MDN contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute