CSS Rule Precedence: Last Rule Wins

Answered using GPT-4o mini by AI Answer Generator

Question:

If multiple rules applied to the same element specify values for the same attribute, the value from the ____ rule in the style sheet is applied. a. first b. last c. Either A or B. d. Neither A nor B.

Answer:

The correct answer is b. last.

In CSS, if multiple rules apply to the same element and specify values for the same attribute, the value from the last rule in the style sheet takes precedence, assuming the rules have the same specificity.