XML

Workshop

The Workshop is designed to help you anticipate possible questions, review what you've learned, and begin learning how to put your knowledge into practice.

Quiz

1.

What is the essential difference between bitmap and vector graphics?

2.

Which element and attribute are used to enable the viewing of an SVG file in existing (that is, nonSVG-dedicated) browsers?

3.

When using the d attribute of the path element, what is the significance of uppercase versus lowercase letters indicating the tool and its value?

4.

With which elements or attributes can you control the overall size of an SVG document?

Quiz Answers

1.

A bitmap graphic is described as a pixel-by-pixel list of instructions, whereas a vector graphic is described as a mathematical equation.

2.

Use the embed element with the pluginspage attribute pointing to the URL where the plug-in can be found.

3.

An uppercase letter is used to reference an absolute set of x, y coordinates; a lowercase letter designates coordinates relative to the insertion point.

4.

You can do any or all of the following:

  • Set the width and height attributes of the svg element.

  • Use the viewBox attribute of the svg element with width and height values.

  • Specify width and height attributes in the img element when presenting the graphic in an HTML document.

Exercises

1.

Create an SVG document named olympics.svg that uses circle elements to recreate the familiar Olympics symbol, which consists of five interlocking colored circles.

2.

Create an HTML document that embeds the olympics.svg document as a vector graphic.