How to create CSS rules that select only those tags that have a specific attribute
How to create rules based on the values of those attributes
How to create rules that select direct children of another element and why you’d want to do that
How to select an element that directly follows another element
An attribute selector tests for the existence, and possibly the values, of any specific HTML attributes set on an element. You’d use an attribute selector if you wanted all elements with a certain attribute to be styled a certain way. For example,
noshade is an HTML attribute for the
<hr> tag; it means that there shouldn’t be any shading ...