xx-large
font size.
The rest of the first line will be blue, and in small-caps.
The rest of the paragraph will be the default font size and color:
:before
/:after
pseudo-element can be used to insert some content before/after an element.
The following example inserts an image before each <h1>
element:
Pseudo-element | Purpose | CSS |
---|---|---|
:first-letter | Adds special style to the first letter of a text | 1 |
:first-line | Adds special style to the first line of a text | 1 |
:before | Inserts some content before an element | 2 |
:after | Inserts some content after an element | 2 |