<!--
{
  "availability" : [
    "iOS: 17.0.0 -",
    "iPadOS: 17.0.0 -",
    "macCatalyst: 17.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Foundation",
  "identifier" : "/documentation/Foundation/NSAttributedString/Key/textItemTag",
  "metadataVersion" : "0.1.0",
  "role" : "Type Property",
  "symbol" : {
    "kind" : "Type Property",
    "modules" : [
      "Foundation"
    ],
    "preciseIdentifier" : "c:@UITextItemTagAttributeName"
  },
  "title" : "textItemTag"
}
-->

# textItemTag

The name of a custom tag associated with a text item.

```
static let textItemTag: NSAttributedString.Key
```

## Discussion

The value of this attribute is an [`NSString`](/documentation/Foundation/NSString) object with the tag name of a <doc://com.apple.documentation/documentation/UIKit/UITextItem> 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)