Explaining every element, attribute, and behavior within the SMIL 2.0 specification is beyond the scope of this chapter; however, what follows is a thorough introduction to the basic structures and components of SMIL.
SMIL is an XML-based language, which means that all of its code needs to be “well formed” according to the rules of XML (see Chapter 30). When writing SMIL (or any XML application), follow these rules:
Tags are case-sensitive. For the most part, single-word elements and
attributes are in all lowercase (e.g.,
<switch>). Multiple-word elements and
attributes use mixed case, also called camel case (e.g.
borderColor). It is important to stick to the
capitalization structures in the specification.
All attribute values must be contained in double quotation marks.
All tags must be closed. For container tags, the closing tag must be
Empty tags (standalone elements that don’t have closing tags,
<br> in HTML) are closed by the addition of
a slash at the end of the tag (e.g.,
Nested elements must not overlap (e.g.,
Like HTML documents, SMIL documents are made up
of a head element and body element. The head element contains
information about the document, including layout instructions (using