Zoo tutorials: [ SQL | Java | Linux | XML ]

A Gentle Introduction to xml

Starting SVG

Question 1: Draw a rectangle

The SVG document shown draws a yellow rectangle with a blue border.

  1. Change it so that is shows a green rectangle in a thicker black border.
  2. We can give the rectangle rounded corners. Look at the documentation at www.w3.org to find out how.
    In the SVG specification (version 1.1 will do) Chapter 9 concerns basic shapes such as the rect element.
    Try to find it yourself - but if you can't... attributes of the rect element.

Question 2: St. Andrew

Draw the cross of St. Andrew. Cross of St. Andrew

Question 3: St. George

The flag of St. George is a red cross on a white background. The width of the lines should be 6. Cross of St. George

Question 4: Jamaica

The Jamaican flag can be drawn as four triangles on a yellow background. Flag of Jamaica

We can use the path element to draw a triangle. This element supports the attribute d which gives the coordinates of the points of the path.

Flag of Jamaica (big with grid) The grid shown is 20 by 10 units.
The attribute value d="M 2 0 L 10 4 L 18 0 Z" means:
Move to (2, 0)
Line to (10, 4)
Line to (18, 0)
the Z means close the shape