The following is the external CSS:
- body{background:#6CC7E1}
- div{height:100px !important; font-size:35px; background:#488921; display:inline-block}
Output
Note: Here note that the value given for the height property in external CSS overrides the values given to this property in Inline and Embedded CSS because in external CSS this value is defined as an important value.
Summary
Now we can say that the priority of the CSS property in an HTML document is applied top to bottom and left to right.
Values defined as Important will have the highest priority.
Inline CSS has a higher priority than embedded and external CSS.
So the final order is:
Value defined as Important > Inline >id nesting > id > class nesting > class > tag nesting > tag.
Feel free to post your opinion about this topic by clicking on post comment.