
Did you know you can align just the last line of a paragraph?
Most developers are familiar with text-align. But there’s a lesser-known CSS property that gives you more control.
This lets you style the final line of text differently from the rest. Here’s how it works:
p {
text-align: justify;
text-align-last: end;
}
—> All lines are justified, except the last one, which aligns to the end.
The best part? A solid 95.28% across modern browsers. So yes, it’s production-ready.
I’m working on an ebook called “You Don’t Need JavaScript”.
To get notified when it launches 👉 https://theosoti.com/you-dont-need-js/