Test of Contextual Selectors
This example document tests formatting associated with
contextual selectors. Contextual selectors specify
formatting that depends on the context of an element.
- Here is an item in an unordered list. According to the
stylesheet, this should be in a yellow-brown, and in the
default font size.
- Here is an LI within a UL within an LI. According to
the stylesheet, this text should be gray, and in a font
slightly smaller than that in the parent element.
- Here is an LI within a UL within an LI within
a UL.
- Ditto. According to the stylesheet, this text
should be in a black, and in an
even smaller font size.
- Here is an LI within an OL within an LI within a UL.
- Ditto. Thus the UL LI selector applies, and the
text is a yellow-brown.