Targeting Elements to Format with Selectors
The property:value; pair is fairly easy to understand. All you’re doing is naming a property (characteristic) of the element and then specifying its format. The trickier part is dealing with selectors because you can use four different types of selectors:
The following sections explain each type of selector in greater detail.
The concept of tag selectors is the easiest to grasp. You simply use the tag without the angle brackets to specify the HTML element you want the style rule to target; for example p for paragraphs, img for images, h1 for level 1 headings, and so on. Using tag selectors, you can apply identical formatting to all instances of a particular ...