More Powerful Methods Remember, any HTML tag can serve as a selector and have Style Sheet declarations attached to it. NOW you want more complex control than that. The repeated title above appears identical without Style Sheets, but the second one is layered, repositioned, and colored with Style Sheets. Classes Say you want a red body text for the first paragraph, blue for the second one, and purple for the third. That's where classes come in.
Contextual Selectors Let's make all bold text red only if it occurs in regular body text.
Style Sheets can to the impossible. Contextual selectors demand a certain situation be true for the declarations to be in effect. The bold text in the first line isn't red, but the bold text in the second line is. This does not work on all browsers. Often the first element 'P' will be selected for the definition and the 'B' will be ignored.