Multiple choice css html

What does the ID selector do?

  1. Apply the style to a specific element

  2. Apply the style to all the elements

  3. Apply the style to a group of elements

  4. Apply the style to elements of the same type

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

In CSS, an ID selector (e.g., #header) is used to target a single, unique element on a page. Class selectors are used for groups of elements, and element selectors (tags) are used for all elements of a specific type. IDs have higher specificity than classes.