Mission 2: Targeting Systems
A universal directive requires all standard data readouts on the ship to use the official 'monospace' font for clarity.
00:00
Mission Objective
Write a CSS rule that targets all `<p>` elements and sets their `font-family` to `monospace`.
Step 1 / 2
System Briefing: The Targeting Computer
To style an element, you must first target it. CSS Selectors are the patterns you use to select the element(s) you want to style. Mastering them is like calibrating a high-precision targeting computer.
Basic Selectors
- Type Selector: Selects all elements of a given type. Ex:
p
selects all paragraph elements. - Class Selector: Selects all elements with a given class attribute. Starts with a period (
.
). Ex:.warning
selects all elements withclass="warning"
. - ID Selector: Selects one unique element with a given ID attribute. Starts with a hash (
#
). Ex:#main-header
. An ID must be unique per page.