XML technologies / SVG / Creating simple SVG graphics / Summary, questions and exercises

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

Summary

  • SVG file contents lie between the tags <svg> and </svg>.

  • To define a file as an SVG graphic, define its DTD using the <DOCTYPE> declaration.

  • SVG tags are consistently lowercase.

  • Attribute names are also case-sensitive, but some contain uppercase letters.

  • SVG graphics can be included in an HTML page using the <EMBED> tag or the <OBJECT> tag.

  • The individual elements of an SVG graphic are called shapes.

Questions and exercises

  1. What is the difference between the tags <ellipse> and <circle>?

Exercises 2 to 5 form one exercise block.

  1. Create an empty SVG file and save it under a name of your choice.

  2. Insert a circle with a diameter of 20 pixels.

  3. Fill the circle blue and give it a red border.

  4. Create an HTML page and insert the graphic with the <EMBED> tag.

  5. What code displays green-filled text at 50/100 in font size 12?

   

 

 

 

back to top