<STYLE type="text/css">
P EM {color:red}
</STYLE>
Now, our previous example does what we want:
It is critical that you protect your Guinness!
Contextual information is hierarchical in nature and can be supplied for an arbitrary number of levels. For example, we could specify a set of rules like this:
<STYLE type="text/css">
P EM {color:red}
UL.outline {color:blue}
UL.outline UL {color:green}
UL.outline UL UL {color:orange}
</STYLE>
And now try them out with the following HTML code:
Here's what it looks like:<UL CLASS=outline> <LI> This is a first-level item. </LI> <UL> <LI> This is a second-level item. </LI> <UL> <LI> This is a third-level item. </LI> </UL> </UL> </UL>
is unaffected and produces this:<UL> <LI> This is a first-level item. </LI> <UL> <LI> This is a second-level item. </LI> <UL> <LI> This is a third-level item. </LI> </UL> </UL> </UL>