<!--
{
  "availability" : [
    "iOS: -",
    "iPadOS: -",
    "macCatalyst: -",
    "macOS: -",
    "tvOS: -",
    "visionOS: -",
    "watchOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "CoreText",
  "identifier" : "/documentation/CoreText/CTTextTab",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "Core Text"
    ],
    "preciseIdentifier" : "c:@T@CTTextTabRef"
  },
  "title" : "CTTextTab"
}
-->

# CTTextTab

A tab in a paragraph style, storing an alignment type and location.

```
class CTTextTab
```

## Overview

Core Text supports five alignment types: [`CTTextAlignment.left`](/documentation/CoreText/CTTextAlignment/left), [`CTTextAlignment.center`](/documentation/CoreText/CTTextAlignment/center), [`CTTextAlignment.right`](/documentation/CoreText/CTTextAlignment/right), [`CTTextAlignment.justified`](/documentation/CoreText/CTTextAlignment/justified) and [`CTTextAlignment.natural`](/documentation/CoreText/CTTextAlignment/natural). These alignment types are absolute, not based on the line sweep direction of text.

For example, tabbed text is always positioned to the left of a right-aligned tab, whether the line sweep direction is left to right or right to left. A tab’s location, on the other hand, is relative to the back margin. A tab set at 1.5 inches, for example, is at 1.5 inches from the right in right-to-left text.

## Topics

### Creating Text Tabs

[`CTTextTabCreate(_:_:_:)`](/documentation/CoreText/CTTextTabCreate(_:_:_:))

Creates and initializes a new text tab object.

[`kCTTabColumnTerminatorsAttributeName`](/documentation/CoreText/kCTTabColumnTerminatorsAttributeName)

Specifies the terminating character for a tab column.

### Getting Text Tab Data

[`CTTextTabGetAlignment(_:)`](/documentation/CoreText/CTTextTabGetAlignment(_:))

Returns the text alignment of the tab.

[`CTTextTabGetLocation(_:)`](/documentation/CoreText/CTTextTabGetLocation(_:))

Returns the tab’s ruler location.

[`CTTextTabGetOptions(_:)`](/documentation/CoreText/CTTextTabGetOptions(_:))

Returns the dictionary of attributes associated with the tab.

### Getting the Type Identifier

[`CTTextTabGetTypeID()`](/documentation/CoreText/CTTextTabGetTypeID())

Returns the Core Foundation type identifier of the text tab object.



---

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)