Universal Selector
Now let’s look at the different kinds of selectors, starting with the simplest one. The universal selector * (an asterisk) selects every single element on the page:
* {
font-family: sans-serif;
}The font-family property sets the font. The value sans-serif means the browser’s sans-serif font, that is, a font without serifs: the small strokes at the ends of letters that fonts such as Times New Roman have. Browsers use a serif font by default, and our page will look more modern without serifs. You’ll learn more about fonts in the lesson Text and Fonts.
Use the universal selector with care: its declarations apply to absolutely every element, including those you didn’t want to change.
Instructions
- 1
At the end of
style.css, create a rule with the universal selector that setsfont-family: sans-serif.