nerdexam
CIW

1D0-61B · Question #33

Which choice describes a correct order of precedence for implementing CSS?

The correct answer is A. Inline styles override all other styles. Inline styles carry the highest specificity in the CSS cascade because they are applied directly to an element via the style attribute, making them the closest possible override to the element itself - nothing short of !important can beat them. Why the distractors are wrong: B…

CSS3 Coding

Question

Which choice describes a correct order of precedence for implementing CSS?

Options

  • AInline styles override all other styles.
  • BExternal styles override all other styles.
  • CInternal (embedded) styles override inline styles.
  • DExternal styles override internal (embedded) styles.

How the community answered

(45 responses)
  • A
    93% (42)
  • B
    4% (2)
  • D
    2% (1)

Explanation

Inline styles carry the highest specificity in the CSS cascade because they are applied directly to an element via the style attribute, making them the closest possible override to the element itself - nothing short of !important can beat them.

Why the distractors are wrong:

  • B is incorrect - external stylesheets have the lowest default precedence; they are overridden by both internal and inline styles.
  • C is incorrect - internal (embedded) styles in a <style> tag do not override inline styles; it's the reverse.
  • D is incorrect - external styles are generally overridden by internal styles (assuming equal specificity and source order), not the other way around.

Memory tip: Think of the cascade as "distance to the element" - the closer the style is to the HTML element, the higher its priority: External → Internal → Inline, with inline winning every time.

Topics

#CSS Specificity#CSS Cascade#Inline Styles#CSS Precedence

Community Discussion

No community discussion yet for this question.

Full 1D0-61B Practice