Is there any way to apply css formatting to just the first (or nth) line of text in CSS?
Suppose I have:
<h2>This is a line of text on my web page</h2>
That gets displayed as:
This is a line of text
on my web page
Is there a way to specify, a priori, separate formatting for the first and second lines without knowing where the line break will occur?
There is only the
:first-linepseudo-element; there isn’t any for the second, third, fourth, … nth lines.