We're looking for a person or people to help audit MDN to find places we could speed up. Is this you or someone you know? Check out the RFP: https://mzl.la/2IHcMiE

style Redirect 3

« SVG Attribute reference home

This attribute specifies style information for the current element. The style attribute specifies style information for a single element. The style sheet language of inline style rules is given by the value of attribute contentStyleType on the <svg> element.

Usage context

Categories Presentation attribute
Value <style>
Animatable No
Normative document SVG 1.1 (2nd Edition)
The syntax of style data depends on the style sheet language. By default, if contentStyleType is not defined, the style sheet language is CSS.


The following example shows styling of a rectangle with the style attribute using CSS as style sheet language.

<svg version="1.1" viewbox="0 0 1000 500" xmlns="http://www.w3.org/2000/svg">
  <rect height="300" width="600" x="200" y="100" 
     style="fill: red; stroke: blue; stroke-width: 3"/>


The following elements can use the style attribute

Document Tags and Contributors

 Last updated by: Jeremie,