Headings: [Skip]

Web-Design Tutorials by Dr Sam

CSS, the Cascade

Menu [Skip]

Combinations and Precedence

Order of precedence

Brainteasers / Quiz

(1)

Here is a combination that has not been mentioned yet about the order of precedence in the cascade. Imagine this:

Which one will take precedence? Which one will be applied to the paragraphs in the document?

Choose an answer:

Serif in the linked style sheet.

smile

Sans-serif in the imported style sheet.

[Explanation]

Explanation

The import command exists within the document level style tags:

So the imported style sheet is lower in the cascade than the linked style sheet.

  • The style at the lower level in the cascade will take precedence if it conflicts with any styles at the upper levels for the same element.

The style in the imported style sheet for the paragraphs will take precedence instead of the style in the linked style sheet for the paragraphs.

Help

Review: