Mission 7: System Styling & Identification

The station's alert system needs to differentiate between alert levels.

00:00

Step 1 / 2

System Briefing: Identification and Presentation

To control specific elements or apply targeted styles, we need to give them unique identifiers. Attributes like id and class serve this purpose, while the style attribute allows for direct, immediate visual modification.

Key Attributes
  • id: Assigns a unique identifier to an element. An ID must be used only once per page. It's like a specific serial number.
  • class: Assigns an element to a group. Many elements can share the same class. It's like a model number or category.
  • style: Applies CSS styles directly to an element (inline styling). This is useful for quick, specific adjustments but less maintainable for large-scale styling than external stylesheets.

Example: <p id="main-alert" class="warning" style="color:red;">Alert!</p>

Editor