If some properties have been set for the same selector in different style sheets, the values will be inherited from the more specific style sheet.
For example, an external style sheet has these properties for the h3 selector:
h3 { color:red; text-align:left; font-size:8pt } |
And an internal style sheet has these properties for the h3 selector:
h3 { text-align:right; font-size:20pt } |
If the page with the internal style sheet also links to the external style sheet the properties for h3 will be:
color:red; text-align:right; font-size:20pt; |
The color is inherited from the external style sheet and the text-alignment and the font-size is replaced by the internal style sheet.
Styles can be specified:
Tip: Even multiple external style sheets can be referenced inside a single HTML document.