Multiple Styles Will Cascade into One
Styles can be specified:
Styles can be specified:
- inside an HTML element
- inside the head section of an HTML page
- in an external CSS file
Cascading order:
What style will be used when there is more than one style specified for an HTML element?
Generally speaking we can say that all the styles will "cascade" into a new "virtual" style sheet by the following rules, where number 4 has the highest priority:
Generally speaking we can say that all the styles will "cascade" into a new "virtual" style sheet by the following rules, where number 4 has the highest priority:
- Browser default
- External style sheet
- Internal style sheet (in the head section)
- Inline style (inside an HTML element)
So, an inline style (inside an HTML element) has the highest priority, which means that it will override a style defined inside the tag, or in an external style sheet, or in a browser (a default value).
1 comment:
I came to this page by searching Yahoo. I have found it quite interesting. Thank you for providing this. I will have to visit here again!
House Buyer San Antonio
Post a Comment