XML technologies / SVG / Creating graphic elements from templates / Summary, questions and exercises

(Excerpt from “Das Einsteigerseminar SVG — Webgrafiken mit XML” by Helma Spona)

Summary

  • Symbols can be defined to make complex elements reusable.

  • Symbols are not rendered.

  • Only when you create an instance of a symbol is that instance rendered and, where appropriate, displayed as the graphic is loaded.

  • Instances are created with the <use> tag.

  • Instances can only receive formatting that is not already defined in the symbol.

Questions and exercises

  1. What is the difference between an element defined with <symbol> and one defined with <g> and referenced with <use>?

  2. Can symbols from external files also be referenced?

  3. How are stylesheets created inside an SVG file?

  4. How can stylesheets be assigned?

   

 

 

 

back to top