Want one sentence to stand out without changing every sentence on your site? Put CSS declarations in that element’s HTML style attribute. This is called inline CSS: it targets a local area rather than setting a site-wide rule. section 7.2.5
<span style="color: red;">This sentence is red</span>
The style attribute sets the enclosed sentence’s color to red. The surrounding span identifies the area to style. section 7.2.5
To try this on a WordPress page:
- Open Pages > All Pages, select a page, and add a Classic block. section 7.7
- Select the block, choose View > Source Code, and add a style attribute to the paragraph tag—for example, <p style="color: red;">This is a paragraph</p>. Click OK to see the change in the editor. section 7.7
Inline styling comes after browser defaults, theme CSS, and CSS entered in Appearance > Customize > Additional CSS in the simplified cascade. Use it sparingly: repeating styles across many elements makes them harder to read and maintain. For repeated styling, define a CSS class and put its name in each element’s class attribute instead. section 7.2.5 section 7.5 section 7.6






