<!--
{
  "documentType" : "article",
  "framework" : "TVML",
  "identifier" : "/documentation/TVML/text-align",
  "metadataVersion" : "0.1.0",
  "role" : "article",
  "title" : "text-align"
}
-->

# 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:

```xml
<title style="text-align:center">This text is horizontally centered.</title>
```

### Values

- `left`: The text aligns along the left edge of the containing element.
- `right`: The text aligns along the right edge of the containing element.
- `center`: The text aligns with the center of the containing element.
- `justified`: The text is justified in the containing element.
- `natural`: The 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.

### Elements that Use text-align

- [text](/documentation/TVML/text)
- [title](/documentation/TVML/title)
- [subtitle](/documentation/TVML/subtitle)
- [decorationLabel](/documentation/TVML/decorationlabel)
- [description](/documentation/TVML/description)

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)