This example doesn't do anything much; we're just illustrating a typical use of the various functions and their syntaxes.
The first few bits of the style details are simple. The margins() method is handy shorthand for setting the four margin properties all at once Â it just saves typing. The rgb() method is similarly handy for specifying colors by value.
In this example, because <B> tags inside <H1> tags are shown as italic, some confusion might arise if <I> tags are also present inside the <H1> tagÂthey could look the same. The "apply" property is used to avoid this case. The change_it() function checks the color the tag details are going to be rendered in and, if the answer is pink, assumes that the <I> tag is inside a <H1> tag and so changes it to medium style.
Revised: March 5, 2001