O'Reilly logo

Sams Teach Yourself SVG in 24 Hours by Micah Laaker

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Inline CSS Property Declarations

The first of the three CSS methods, inline CSS property declarations, can be considered the “quick and dirty” process of applying style to an element. To apply this method, you add a style attribute to an element, along with its desired attribute values. For instance, in the lightning bolt example you created previously (Listing 5.8), you applied a stroke and a fill to the object to demonstrate the difference between the polyline and polygon elements. This was done by inserting the following snippet in the polygon element:

style="stroke:black; fill:yellow;". 

As you can see from the example, nomenclature for style attributes is quite simple. Each attribute value consists of a style “declaration”: a style “property” ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required