Complex Pseudo Class Attribute CSS Selectors - RJM Programming - August, 2016
... CSS works on HTML ...
... as shown below ...
... Thanks to ...
http://learn.shayhowe.com/advanced-html-css/complex-selectors/

Default text colour is black ... This is an unselected a outside section ... ... but img gets a yellow border as the :only-child of a parent element
... This is selected with background colour cyan because it is a section :first-child a within section ...

... This is an h2 ...

This h2 ~ a and h2 + a section paragraph will be selected as a "General Sibling" and so background-color will be lightblue and will be selected as an "Adjacent Sibling" so font colour will be blue, but only having never been visited as :link, else it will be green as :visited
... This is an unselected a within section ...
This h2 ~ a section paragraph will be selected as a "General Sibling" and so background-color will be lightblue
Another h2 ~ a section paragraph will be selected, but only on hovering as :hover, as a "General Sibling" and so background-color will be orange given Attribute a[href="http://www.rjmprogramming.com.au"] and will be selected as an "Adjacent Sibling" so font colour will be blue and will be bold given the Attribute select a[target="_blank"]
Last of h2 ~ a section paragraphs will be selected, but only on hovering as :hover, as a "General Sibling" and so background-color will be pink as the :last-child given Attribute a[href*="rjmprogramming.com.au"] contains domain "rjmprogramming.com.au" and will be selected as an "Adjacent Sibling" so font colour will be blue and will be bold given the Attribute select a[target="_blank"]
... This is an unselected a outside section and outside article ...
This article > a article paragraph will be selected as a "Direct Child" and so font-style will be italic
... This is an unselected a within article ... ... but the img that follows gets a green border being the :only-of-type within the parent element