Styling the First Line of Text in CSS


Use the ::first-line pseudo-element to style the first line of a block of text.

Source Code

p::first-line {
    font-weight: bold;
    font-size: larger;
}
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments