Interview Questions

What is 'important' declaration?

CSS Interview Questions and Questions

(Continued from previous question...)

51. What is 'important' declaration?

Important declaration is a declaration with increased weight. Declaration with increased weight will override declarations with normal weight. If both reader's and author's style sheet contain statements with important declarations the author's declaration will override the reader's.

BODY {background: white ! important; color: black}

In the example above the background property has increased weight while the color property has normal.

(Continued on next question...)

Other Interview Questions