Is there any way purely with CSS (or ‘proper’ markup) to style the 2nd line of a paragraph when the text wraps to a second line? A well placed <br /> would do it, but I don’t believe that’s good markup or SEO.
Specifically, say I have a paragraph that is 2 lines long. I would like the 2nd line to have a wider width than the first line. So the paragraph is a little “pyramid-like”. But I don’t want to use anything that’s not a proper way to do this just for beauty’s sake.
Example:
<p>I am a very long
sentence where my second line is longer.</p>
You can use the
:first-linepseudo-element:See: http://jsfiddle.net/X33pY/ – resize the window to make a second line in the first paragraph.
Just in case, this might be what you’re after:
http://jsfiddle.net/qKRh8/