Headings: [Skip]

Web-Design Tutorials by Dr Sam

CSS, the Cascade

Menu [Skip]

Combinations and Precedence

Order of precedence

Brainteasers / Quiz

(2)

Here is another combination that has not been mentioned yet. 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.

Sans-serif in the imported style sheet.

smile

Monospace as the document level style.

[Explanation]

Explanation

The import command must come first within the document level style tags. Any document levels style must come after it.

So the document level style is lower in the cascade than the imported 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 document level style for the paragraphs will take precedence instead of the styles in the imported style sheet and the linked style sheet for the paragraphs.

Help

Review: