Example of Different Ways to Style SVG

View the source of this page to see the differences in each example.

Example 1: Attributes

Bear

Example 2: Inline Styles

Bear

Example 3: Style Element inside the SVG

Bear

Example 4: Normal Embedded Styles (or external styles). Note: this will only work if you're using an inline SVG file (not including it as an img src)

See the head of this html document to see the associated style element.

Bear