ZVON > References > Zvon Example Repository
Example repository: index | categories | search

All > SVG > Style > Using CSS within SVG - embedding

Generally, there are two possibilities - embed style in the document or link an external CSS file using a processing instruction. In the former case it is recommended to enclose CSS rules in CDATA section.


Output
Output - picture
SVG version


Source
<svg width="100" height="30" xmlns="http://www.w3.org/2000/svg" >
     <style type="text/css"> text {fill: red; font-family: SansSerif} </style>
     <text x="0" y="20">Red text</text>
</svg>