SVG Styling Attributes

The SVG styling attributes are all the attributes that can be specified on any SVG element to apply CSS styling effects.

Attributes

class
Assigns a class name or set of class names to an element. It functions identically to the class attribute in HTML.
Value: Any valid ID string; Animatable: Yes
style
It specifies style information for its element. It functions identically to the style attribute in HTML.
Value: Any valid style string; Animatable: No

 

Browser compatibility

Update compatibility data on GitHub
DesktopMobile
ChromeEdgeFirefoxInternet ExplorerOperaSafariAndroid webviewChrome for AndroidEdge MobileFirefox for AndroidOpera for AndroidiOS SafariSamsung Internet
classChrome Full support YesEdge Full support YesFirefox Full support YesIE Full support YesOpera Full support YesSafari Full support YesWebView Android Full support YesChrome Android Full support YesEdge Mobile Full support YesFirefox Android Full support YesOpera Android Full support YesSafari iOS Full support YesSamsung Internet Android ?
styleChrome Full support YesEdge Full support YesFirefox Full support YesIE Full support YesOpera Full support YesSafari Full support YesWebView Android Full support YesChrome Android Full support YesEdge Mobile Full support YesFirefox Android Full support YesOpera Android Full support YesSafari iOS Full support YesSamsung Internet Android ?

Legend

Full support  
Full support
Compatibility unknown  
Compatibility unknown

Document Tags and Contributors

Contributors to this page: Jeremie
Last updated by: Jeremie,