Styling Specific Characters with ::first-letter and ::first-line in CSS


Target the first letter or line of a text element for unique styling.

Source Code

p::first-letter {
    font-size: 200%;
    color: #ff6347;
}
p::first-line {
    font-weight: bold;
}
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments