text-align
Aligns text horizontally in an element.
Overview
Use the text-align style to specify how the text should be horizontally aligned in an element.
Here’s an example that horizontally centers the text in a title element:
<title style="text-align:center">This text is horizontally centered.</title>Values
leftThe text aligns along the left edge of the containing element.
rightThe text aligns along the right edge of the containing element.
centerThe text aligns with the center of the containing element.
justifiedThe text is justified in the containing element.
naturalThe text aligns based on the default alignment associated with the current localization of the app. The default for left-to-right scripts is left-alignment along the left edge of the containing element. The default alignment for right-to-left scripts is right-alignment along the right edge of the containing element.