body * p li em a
div[class] + div * * > [href]
* * > * + * + * p * > * *
div > p:first-child a
p#green > span + code[id] em
* > * + * * * * * > * a
body h1 + div div p:first-child + div p span em a
h1#first + h2#second + div#main
div:first-child > * > li:first-child
body > h1.opener
font-style: normal;
(inherited from body rule)font-variant: small-caps;
(inherited from body rule)font-size: 12px;
(inherited from body rule)line-height: 16px;
(inherited from body rule)font-family: arial, sans-serif;
(inherited from div#main rule)font-weight: bold;
(from p rule - direct match)background: yellow;
(from p rule - direct match)color: red;
(from div#main > p rule - direct match)color: green;
(ol li rule - direct match)font-style: italic;
(ol li rule - direct match)font-size: 12px;
(inherited from body rule)line-height: 16px;
(inherited from body rule)font-weight: normal;
(inherited from div#main rule)background: orange;
(ol li rule - direct match)font-variant: small-caps;
(inherited from body rule)font-family: arial, sans-serif;
(inherited from div#main rule)div#main > p.normal > a:first-child {
font-weight: bold; }
div#main > :first-child + * + * li:first-child + * {
border: .1em solid #0000FF; }
<a href="http://www.sdm.com">
link green when it has been visited. This style should not apply to any other links in the document.
a:visited[href="http://www.sdm.com"] {
color: #00CC00; }