Why did a heading turn blue when you set it to red? More than one CSS declaration can set the same property. The cascade determines which value the browser uses. When a property is repeated within one style sheet, the lower declaration overrules the earlier one. section 7.2.4
h1 {
color: red;
}
h1 {
color: blue;
}
Both rules set the color of h1 headings. Blue appears because its declaration comes later in the style sheet. section 7.2.4
For a WordPress site, picture four levels from earliest to latest:
- Browser defaults provide a starting appearance. section 7.2.5
- The theme’s CSS can overrule those defaults. You can view it under Appearance > Theme File Editor, but do not modify the theme files. section 7.2.5
- Your site-wide CSS, entered under Appearance > Customize > Additional CSS, comes next. section 7.2.5
- Inline CSS, placed in a page’s HTML, targets a local area and is the final level in this four-level picture. section 7.2.5
Find out why a style lost
Right-click the page and choose Inspect. Select the heading in the HTML pane, then check its rules in the Styles pane. A crossed-out property has been overruled. You can edit a value there to see the visual result immediately before changing your site’s CSS. section 7.3
Choose the reach of a change deliberately: site-wide CSS is useful for a consistent look, while inline CSS can style just a word, paragraph, or page area. section 7.2.5 section 7.5




