17.1. Type (Element) SelectorThe most straightforward selector is the type selector that targets an element by name, as shown in these examples: h1 {color: blue;} h2 {color: blue;} p {color: blue;} Type selectors can be grouped into comma-separated lists so a single property will apply to all of them. The following code has the same effect as the previous code: h1, h2, p {color: blue;} CSS 2 introduced a universal element selector (*) that matches any element (like a wildcard). The style rule * {color: gray} makes every element in a document gray. The universal selector may be a useful tool when used in relation to other elements, as discussed in the next section.
|