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” ...
Get Sams Teach Yourself SVG in 24 Hours now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.