css.properties

text-align

The text-align property specifies the horizontal alignment of text.

Formal Syntax

start | end | left | right | center | <string> | justify | match-parent | justify-all

See specification

JavaScript Access

// Access via element.style
element.style.textAlign = 'start';

Browser Support

standard | MDN · Spec · Spec

FeatureChromeFirefoxSafariEdge
text-align11112
center11≤479
end113.179
justify11112
left11≤479
match-parent164015.479
right11≤479
start113.179

Related Properties