CSS text-align property with the right value
The right-aligned text sticks to the right edge of a page or container. For that matter, we use the text-align
property with the right
value. The most basic syntax goes like this:
{
text-align: right;
}
Right alignment is one of the least common types as it takes too much effort for users to scan and consume.
In turn, it can be helpful for headlines or short messages for creating a unique or "offbeat" look and feel. Indeed, in languages with right-to-left scripts, like Arabic, Hebrew or Urdu, flush right alignment is the first choice to maintain readability.