Multiple style will Cascade into One
CSS
Style can be specified:
- Inside an HTML element.
- Inside the head section of the HTML page.
- In an external CSS file, even multiple external style sheets can be referenced inside a single HTML document.
What style will
be used when there is more than one style specified for an HTML element?
In generally we can say that all the CSS styles will cascade into a new visual style sheet by the following rules:
- Browser default
- External style sheet
- Internal style sheet (in the head section)
- Inline style sheet (inside the HTML elements) this style sheet has the highest priority.
So, an inline
style sheet has the highest priority which means that it will override a style
defined in the head tag or the external style sheet or browser default value.
If the link to
the external style sheet is placed after the internal style sheet in HTML the
external style sheet will override the internal style sheet.
Leave a comment
No Cmomments yet