Multiple choice technology programming languages

Which CSS selector type applies a style to all instances of a particular component type? An example is creating a style for all instances of the Label class.

  1. Inline Selector

  2. Class Selector

  3. Type Selector

  4. None of the above

Reveal answer Fill a bubble to check yourself
C Correct answer
Explanation

Type selectors apply styles to all instances of a component type (e.g., all Button components). Class selectors use dot notation for specific classes (.myClass), inline styles apply to single instances, and ID selectors target specific component IDs.

AI explanation

A type selector targets every element/component of a given type (e.g. every Label), applying the same style wherever that type is used, without needing a class or id on each instance. Class selectors instead require an explicit class attribute on each element you want styled, and inline styles apply only to one specific element, not to a whole type.