text-align
Sets the horizontal alignment of inline-level content inside a block container. It can align text to the left, right, center, or justify it.
It is documented as part of the CSS Text specification.
Syntax
/* Usage Example */
.centered-text {
text-align: center;
/* aligns text to the middle of its container */
}
/* Syntax */
text-align: start;
text-align: end;
text-align: left;
text-align: right;
text-align: center;
text-align: justify;
text-align: match-parent;
/* Global values */
text-align: inherit;
text-align: initial;
text-align: revert;
text-align: revert-layer;
text-align: unset;
text-align Browser support
Widely available
Since
2015 96% global usage
This feature is well established and works across many devices and browser versions. It has been available across browsers since 2015.
1+
1+
1+
12+