<!--
{
  "availability" : [
    "iOS: 2.0.0 -",
    "iPadOS: 2.0.0 -",
    "macCatalyst: 13.0.0 -",
    "macOS: 10.0.0 -",
    "tvOS: 9.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 2.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Foundation",
  "identifier" : "/documentation/Foundation/NSAttributedString/Key",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "Foundation"
    ],
    "preciseIdentifier" : "c:@T@NSAttributedStringKey"
  },
  "title" : "NSAttributedString.Key"
}
-->

# NSAttributedString.Key

The attributes you apply to ranges of characters in an attributed string.

```
struct Key
```

## Discussion

The [`NSAttributedString.Key`](/documentation/Foundation/NSAttributedString/Key) type defines the attributes you apply to ranges of characters in an attributed string. Some attributes provide information about how to render, lay out, or interpret the text, while other attributes provide transient or collaborative information. Attributes like the [`font`](/documentation/Foundation/NSAttributedString/Key/font), [`kern`](/documentation/Foundation/NSAttributedString/Key/kern), and [`strokeColor`](/documentation/Foundation/NSAttributedString/Key/strokeColor) contain information that the rendering system uses to display the text. Attributes like the [`spellingState`](/documentation/Foundation/NSAttributedString/Key/spellingState), [`textHighlightStyle`](/documentation/Foundation/NSAttributedString/Key/textHighlightStyle), or [`accessibilityCustomText`](/documentation/Foundation/NSAttributedString/Key/accessibilityCustomText) contain semantic information from other parts of the system. Some of these semantic attributes also affect how the system renders the text, but they are transient attributes unlike the core rendering attributes.

## Topics

### Getting rendering attribute keys

[`backgroundColor`](/documentation/Foundation/NSAttributedString/Key/backgroundColor)

The color of the background behind the text.

[`baselineOffset`](/documentation/Foundation/NSAttributedString/Key/baselineOffset)

The vertical offset for the position of the text.

[`font`](/documentation/Foundation/NSAttributedString/Key/font)

The font of the text.

[`foregroundColor`](/documentation/Foundation/NSAttributedString/Key/foregroundColor)

The color of the text.

[`glyphInfo`](/documentation/Foundation/NSAttributedString/Key/glyphInfo)

The name of a glyph info object.

[`kern`](/documentation/Foundation/NSAttributedString/Key/kern)

The kerning of the text.

[`ligature`](/documentation/Foundation/NSAttributedString/Key/ligature)

The ligature of the text.

[`paragraphStyle`](/documentation/Foundation/NSAttributedString/Key/paragraphStyle)

The paragraph style of the text.

[`strikethroughColor`](/documentation/Foundation/NSAttributedString/Key/strikethroughColor)

The color of the strikethrough.

[`strikethroughStyle`](/documentation/Foundation/NSAttributedString/Key/strikethroughStyle)

The strikethrough style of the text.

[`strokeColor`](/documentation/Foundation/NSAttributedString/Key/strokeColor)

The color of the stroke.

[`strokeWidth`](/documentation/Foundation/NSAttributedString/Key/strokeWidth)

The width of the stroke.

[`superscript`](/documentation/Foundation/NSAttributedString/Key/superscript)

The superscript of the text.

[`tracking`](/documentation/Foundation/NSAttributedString/Key/tracking)

The amount to modify the default tracking.

[`underlineColor`](/documentation/Foundation/NSAttributedString/Key/underlineColor)

The color of the underline.

[`underlineStyle`](/documentation/Foundation/NSAttributedString/Key/underlineStyle)

The underline style of the text.

[`writingDirection`](/documentation/Foundation/NSAttributedString/Key/writingDirection)

The writing direction of the text.

### Getting rendering attribute keys

  <doc://com.apple.documentation/documentation/UIKit/NSBackgroundColorAttributeName>

  <doc://com.apple.documentation/documentation/UIKit/NSBaselineOffsetAttributeName>

  <doc://com.apple.documentation/documentation/UIKit/NSFontAttributeName>

  <doc://com.apple.documentation/documentation/UIKit/NSForegroundColorAttributeName>

  <doc://com.apple.documentation/documentation/AppKit/NSGlyphInfoAttributeName>

  <doc://com.apple.documentation/documentation/UIKit/NSKernAttributeName>

  <doc://com.apple.documentation/documentation/UIKit/NSLigatureAttributeName>

  <doc://com.apple.documentation/documentation/UIKit/NSParagraphStyleAttributeName>

  <doc://com.apple.documentation/documentation/UIKit/NSStrikethroughColorAttributeName>

  <doc://com.apple.documentation/documentation/UIKit/NSStrikethroughStyleAttributeName>

  <doc://com.apple.documentation/documentation/UIKit/NSStrokeColorAttributeName>

  <doc://com.apple.documentation/documentation/UIKit/NSStrokeWidthAttributeName>

  <doc://com.apple.documentation/documentation/AppKit/NSSuperscriptAttributeName>

  <doc://com.apple.documentation/documentation/UIKit/NSTrackingAttributeName>

  <doc://com.apple.documentation/documentation/UIKit/NSUnderlineColorAttributeName>

  <doc://com.apple.documentation/documentation/UIKit/NSUnderlineStyleAttributeName>

  <doc://com.apple.documentation/documentation/UIKit/NSWritingDirectionAttributeName>

### Getting text attribute keys

[`cursor`](/documentation/Foundation/NSAttributedString/Key/cursor)

The cursor object.

[`link`](/documentation/Foundation/NSAttributedString/Key/link)

The link for the text.

[`markedClauseSegment`](/documentation/Foundation/NSAttributedString/Key/markedClauseSegment)

The index of the marked clause segment.

[`replacementIndex`](/documentation/Foundation/NSAttributedString/Key/replacementIndex)

The replacement position associated with a format string specifier.

[`shadow`](/documentation/Foundation/NSAttributedString/Key/shadow)

The shadow of the text.

[`spellingState`](/documentation/Foundation/NSAttributedString/Key/spellingState)

The spelling state of the text.

[`suggestionHighlight`](/documentation/Foundation/NSAttributedString/Key/suggestionHighlight)

A highlight associated with a Spotlight suggestion.

[`textAlternatives`](/documentation/Foundation/NSAttributedString/Key/textAlternatives)

The alternatives for the text.

[`textEffect`](/documentation/Foundation/NSAttributedString/Key/textEffect)

An attribute that applies a text effect to the text.

[`textHighlightColorScheme`](/documentation/Foundation/NSAttributedString/Key/textHighlightColorScheme)

The custom highlight color to apply to the text.

[`textHighlightStyle`](/documentation/Foundation/NSAttributedString/Key/textHighlightStyle)

An attribute that adds a highlight color to the text to emphasize it.

[`textItemTag`](/documentation/Foundation/NSAttributedString/Key/textItemTag)

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

[`toolTip`](/documentation/Foundation/NSAttributedString/Key/toolTip)

The tooltip text.

### Getting text attribute keys

  <doc://com.apple.documentation/documentation/AppKit/NSCursorAttributeName>

  <doc://com.apple.documentation/documentation/UIKit/NSLinkAttributeName>

  <doc://com.apple.documentation/documentation/AppKit/NSMarkedClauseSegmentAttributeName>

[`replacementIndex`](/documentation/Foundation/NSAttributedString/Key/replacementIndex)

The replacement position associated with a format string specifier.

  <doc://com.apple.documentation/documentation/UIKit/NSShadowAttributeName>

  <doc://com.apple.documentation/documentation/AppKit/NSSpellingStateAttributeName>

  <doc://com.apple.documentation/documentation/CoreSpotlight/CSSuggestionHighlightAttributeName>

  <doc://com.apple.documentation/documentation/AppKit/NSTextAlternativesAttributeName>

  <doc://com.apple.documentation/documentation/UIKit/NSTextEffectAttributeName>

  <doc://com.apple.documentation/documentation/UIKit/NSTextHighlightColorSchemeAttributeName>

  <doc://com.apple.documentation/documentation/UIKit/NSTextHighlightStyleAttributeName>

  <doc://com.apple.documentation/documentation/UIKit/UITextItemTagAttributeName>

  <doc://com.apple.documentation/documentation/AppKit/NSToolTipAttributeName>

### Getting attachment attribute keys

[`adaptiveImageGlyph`](/documentation/Foundation/NSAttributedString/Key/adaptiveImageGlyph)

The adaptive image glyph for the text.

[`attachment`](/documentation/Foundation/NSAttributedString/Key/attachment)

The attachment for the text.

### Getting attachment attribute keys

  <doc://com.apple.documentation/documentation/UIKit/NSAdaptiveImageGlyphAttributeName>

  <doc://com.apple.documentation/documentation/UIKit/NSAttachmentAttributeName>

### Getting accessibility attribute keys

[`accessibilityAlignment`](/documentation/Foundation/NSAttributedString/Key/accessibilityAlignment)

[`accessibilityAnnotationTextAttribute`](/documentation/Foundation/NSAttributedString/Key/accessibilityAnnotationTextAttribute)

[`accessibilityAttachment`](/documentation/Foundation/NSAttributedString/Key/accessibilityAttachment)

Text attachment (`id`).

[`accessibilityAutocorrected`](/documentation/Foundation/NSAttributedString/Key/accessibilityAutocorrected)

Autocorrected text (`NSNumber` as a Boolean value).

[`accessibilityBackgroundColor`](/documentation/Foundation/NSAttributedString/Key/accessibilityBackgroundColor)

Text background color (`CGColorRef`).

[`accessibilityCustomText`](/documentation/Foundation/NSAttributedString/Key/accessibilityCustomText)

[`accessibilityFont`](/documentation/Foundation/NSAttributedString/Key/accessibilityFont)

Font keys (`NSDictionary`).

[`accessibilityFontBoldAttribute`](/documentation/Foundation/NSAttributedString/Key/accessibilityFontBoldAttribute)

[`accessibilityFontItalicAttribute`](/documentation/Foundation/NSAttributedString/Key/accessibilityFontItalicAttribute)

[`accessibilityForegroundColor`](/documentation/Foundation/NSAttributedString/Key/accessibilityForegroundColor)

Text foreground color (`CGColorRef`).

[`accessibilityLanguage`](/documentation/Foundation/NSAttributedString/Key/accessibilityLanguage)

[`accessibilityLink`](/documentation/Foundation/NSAttributedString/Key/accessibilityLink)

Text link (`id`).

[`accessibilityListItemIndex`](/documentation/Foundation/NSAttributedString/Key/accessibilityListItemIndex)

[`accessibilityListItemLevel`](/documentation/Foundation/NSAttributedString/Key/accessibilityListItemLevel)

[`accessibilityListItemPrefix`](/documentation/Foundation/NSAttributedString/Key/accessibilityListItemPrefix)

[`accessibilityMarkedMisspelled`](/documentation/Foundation/NSAttributedString/Key/accessibilityMarkedMisspelled)

Misspelled text that is visibly marked as misspelled (`NSNumber` as a Boolean value). If you’re implementing a custom text-editing app, use `NSAccessibilityMarkedMisspelledTextAttribute` to ensure that VoiceOver properly identifies misspelled text to users.

[`accessibilityMisspelled`](/documentation/Foundation/NSAttributedString/Key/accessibilityMisspelled)

Misspelled text that isn’t necessarily visibly marked as misspelled ([`NSNumber`](/documentation/Foundation/NSNumber) as a Boolean value). Beginning in macOS 10.9, VoiceOver no longer checks for this attribute; instead, VoiceOver uses [`accessibilityMarkedMisspelled`](/documentation/Foundation/NSAttributedString/Key/accessibilityMarkedMisspelled).

[`accessibilityShadow`](/documentation/Foundation/NSAttributedString/Key/accessibilityShadow)

Text shadow (`NSNumber` as a Boolean value).

[`accessibilitySpeechAnnouncementPriority`](/documentation/Foundation/NSAttributedString/Key/accessibilitySpeechAnnouncementPriority)

[`accessibilitySpeechIPANotation`](/documentation/Foundation/NSAttributedString/Key/accessibilitySpeechIPANotation)

A key that indicates the pronunciation of a specific word or phrase, such as a proper name.

[`accessibilitySpeechLanguage`](/documentation/Foundation/NSAttributedString/Key/accessibilitySpeechLanguage)

A key that indicates the language to use when speaking a string.

[`accessibilitySpeechPitch`](/documentation/Foundation/NSAttributedString/Key/accessibilitySpeechPitch)

A key that indicates the pitch to apply to spoken content.

[`accessibilitySpeechPunctuation`](/documentation/Foundation/NSAttributedString/Key/accessibilitySpeechPunctuation)

A key that indicates whether to speak punctuation.

[`accessibilitySpeechQueueAnnouncement`](/documentation/Foundation/NSAttributedString/Key/accessibilitySpeechQueueAnnouncement)

A key that indicates whether to queue an announcement behind existing speech or to interrupt it.

[`accessibilitySpeechSpellOut`](/documentation/Foundation/NSAttributedString/Key/accessibilitySpeechSpellOut)

[`accessibilityTextCustom`](/documentation/Foundation/NSAttributedString/Key/accessibilityTextCustom)

A key for specifying custom attributes to apply to the text.

[`accessibilityTextHeadingLevel`](/documentation/Foundation/NSAttributedString/Key/accessibilityTextHeadingLevel)

A key for specifying the heading level of the text.

[`accessibilityStrikethrough`](/documentation/Foundation/NSAttributedString/Key/accessibilityStrikethrough)

Text strikethrough (`NSNumber` as a Boolean value).

[`accessibilityStrikethroughColor`](/documentation/Foundation/NSAttributedString/Key/accessibilityStrikethroughColor)

Text strikethrough color (`CGColorRef`).

[`accessibilitySuperscript`](/documentation/Foundation/NSAttributedString/Key/accessibilitySuperscript)

Text superscript style (`NSNumber`). Values > 0 are superscript; values < 0 are subscript.

[`accessibilityUnderline`](/documentation/Foundation/NSAttributedString/Key/accessibilityUnderline)

Text underline style (`NSNumber`).

[`accessibilityUnderlineColor`](/documentation/Foundation/NSAttributedString/Key/accessibilityUnderlineColor)

Text underline color (`CGColorRef`).

[`UIAccessibilityTextAttributeContext`](/documentation/Foundation/NSAttributedString/Key/UIAccessibilityTextAttributeContext)

### Getting accessibility attribute keys

[`accessibilityAlignment`](/documentation/Foundation/NSAttributedString/Key/accessibilityAlignment)

[`accessibilityAnnotationTextAttribute`](/documentation/Foundation/NSAttributedString/Key/accessibilityAnnotationTextAttribute)

[`accessibilityAttachment`](/documentation/Foundation/NSAttributedString/Key/accessibilityAttachment)

Text attachment (`id`).

[`accessibilityAutocorrected`](/documentation/Foundation/NSAttributedString/Key/accessibilityAutocorrected)

Autocorrected text (`NSNumber` as a Boolean value).

[`accessibilityBackgroundColor`](/documentation/Foundation/NSAttributedString/Key/accessibilityBackgroundColor)

Text background color (`CGColorRef`).

[`accessibilityCustomText`](/documentation/Foundation/NSAttributedString/Key/accessibilityCustomText)

[`accessibilityFont`](/documentation/Foundation/NSAttributedString/Key/accessibilityFont)

Font keys (`NSDictionary`).

[`accessibilityForegroundColor`](/documentation/Foundation/NSAttributedString/Key/accessibilityForegroundColor)

Text foreground color (`CGColorRef`).

[`accessibilityLanguage`](/documentation/Foundation/NSAttributedString/Key/accessibilityLanguage)

[`accessibilityLink`](/documentation/Foundation/NSAttributedString/Key/accessibilityLink)

Text link (`id`).

[`accessibilityListItemIndex`](/documentation/Foundation/NSAttributedString/Key/accessibilityListItemIndex)

[`accessibilityListItemLevel`](/documentation/Foundation/NSAttributedString/Key/accessibilityListItemLevel)

[`accessibilityListItemPrefix`](/documentation/Foundation/NSAttributedString/Key/accessibilityListItemPrefix)

[`accessibilityMarkedMisspelled`](/documentation/Foundation/NSAttributedString/Key/accessibilityMarkedMisspelled)

Misspelled text that is visibly marked as misspelled (`NSNumber` as a Boolean value). If you’re implementing a custom text-editing app, use `NSAccessibilityMarkedMisspelledTextAttribute` to ensure that VoiceOver properly identifies misspelled text to users.

[`accessibilityMisspelled`](/documentation/Foundation/NSAttributedString/Key/accessibilityMisspelled)

Misspelled text that isn’t necessarily visibly marked as misspelled ([`NSNumber`](/documentation/Foundation/NSNumber) as a Boolean value). Beginning in macOS 10.9, VoiceOver no longer checks for this attribute; instead, VoiceOver uses [`accessibilityMarkedMisspelled`](/documentation/Foundation/NSAttributedString/Key/accessibilityMarkedMisspelled).

[`accessibilityShadow`](/documentation/Foundation/NSAttributedString/Key/accessibilityShadow)

Text shadow (`NSNumber` as a Boolean value).

[`accessibilitySpeechAnnouncementPriority`](/documentation/Foundation/NSAttributedString/Key/accessibilitySpeechAnnouncementPriority)

[`accessibilitySpeechIPANotation`](/documentation/Foundation/NSAttributedString/Key/accessibilitySpeechIPANotation)

A key that indicates the pronunciation of a specific word or phrase, such as a proper name.

[`accessibilitySpeechLanguage`](/documentation/Foundation/NSAttributedString/Key/accessibilitySpeechLanguage)

A key that indicates the language to use when speaking a string.

[`accessibilitySpeechPitch`](/documentation/Foundation/NSAttributedString/Key/accessibilitySpeechPitch)

A key that indicates the pitch to apply to spoken content.

[`accessibilitySpeechPunctuation`](/documentation/Foundation/NSAttributedString/Key/accessibilitySpeechPunctuation)

A key that indicates whether to speak punctuation.

[`accessibilitySpeechQueueAnnouncement`](/documentation/Foundation/NSAttributedString/Key/accessibilitySpeechQueueAnnouncement)

A key that indicates whether to queue an announcement behind existing speech or to interrupt it.

[`accessibilitySpeechSpellOut`](/documentation/Foundation/NSAttributedString/Key/accessibilitySpeechSpellOut)

[`accessibilityTextCustom`](/documentation/Foundation/NSAttributedString/Key/accessibilityTextCustom)

A key for specifying custom attributes to apply to the text.

[`accessibilityTextHeadingLevel`](/documentation/Foundation/NSAttributedString/Key/accessibilityTextHeadingLevel)

A key for specifying the heading level of the text.

[`accessibilityStrikethrough`](/documentation/Foundation/NSAttributedString/Key/accessibilityStrikethrough)

Text strikethrough (`NSNumber` as a Boolean value).

[`accessibilityStrikethroughColor`](/documentation/Foundation/NSAttributedString/Key/accessibilityStrikethroughColor)

Text strikethrough color (`CGColorRef`).

[`accessibilitySuperscript`](/documentation/Foundation/NSAttributedString/Key/accessibilitySuperscript)

Text superscript style (`NSNumber`). Values > 0 are superscript; values < 0 are subscript.

[`accessibilityUnderline`](/documentation/Foundation/NSAttributedString/Key/accessibilityUnderline)

Text underline style (`NSNumber`).

[`accessibilityUnderlineColor`](/documentation/Foundation/NSAttributedString/Key/accessibilityUnderlineColor)

Text underline color (`CGColorRef`).

[`UIAccessibilityTextAttributeContext`](/documentation/Foundation/NSAttributedString/Key/UIAccessibilityTextAttributeContext)

  <doc://com.apple.documentation/documentation/AppKit/NSAccessibilityTextAlignmentAttribute>

  <doc://com.apple.documentation/documentation/AppKit/NSAccessibilityAnnotationTextAttribute>

  <doc://com.apple.documentation/documentation/AppKit/NSAccessibilityAttachmentTextAttribute>

  <doc://com.apple.documentation/documentation/AppKit/NSAccessibilityAutocorrectedTextAttribute>

  <doc://com.apple.documentation/documentation/AppKit/NSAccessibilityBackgroundColorTextAttribute>

  <doc://com.apple.documentation/documentation/AppKit/NSAccessibilityCustomTextAttribute>

  <doc://com.apple.documentation/documentation/AppKit/NSAccessibilityFontTextAttribute>

  <doc://com.apple.documentation/documentation/AppKit/NSAccessibilityForegroundColorTextAttribute>

  <doc://com.apple.documentation/documentation/AppKit/NSAccessibilityLanguageTextAttribute>

  <doc://com.apple.documentation/documentation/AppKit/NSAccessibilityLinkTextAttribute>

  <doc://com.apple.documentation/documentation/AppKit/NSAccessibilityListItemIndexTextAttribute>

  <doc://com.apple.documentation/documentation/AppKit/NSAccessibilityListItemLevelTextAttribute>

  <doc://com.apple.documentation/documentation/AppKit/NSAccessibilityListItemPrefixTextAttribute>

  <doc://com.apple.documentation/documentation/AppKit/NSAccessibilityMarkedMisspelledTextAttribute>

  <doc://com.apple.documentation/documentation/AppKit/NSAccessibilityMisspelledTextAttribute>

  <doc://com.apple.documentation/documentation/AppKit/NSAccessibilityShadowTextAttribute>

  <doc://com.apple.documentation/documentation/UIKit/UIAccessibilitySpeechAttributeAnnouncementPriority>

  <doc://com.apple.documentation/documentation/UIKit/UIAccessibilitySpeechAttributeIPANotation>

  <doc://com.apple.documentation/documentation/UIKit/UIAccessibilitySpeechAttributeLanguage>

  <doc://com.apple.documentation/documentation/UIKit/UIAccessibilitySpeechAttributePitch>

  <doc://com.apple.documentation/documentation/UIKit/UIAccessibilitySpeechAttributePunctuation>

  <doc://com.apple.documentation/documentation/UIKit/UIAccessibilitySpeechAttributeQueueAnnouncement>

  <doc://com.apple.documentation/documentation/UIKit/UIAccessibilitySpeechAttributeSpellOut>

  <doc://com.apple.documentation/documentation/UIKit/UIAccessibilityTextAttributeCustom>

  <doc://com.apple.documentation/documentation/UIKit/UIAccessibilityTextAttributeHeadingLevel>

  <doc://com.apple.documentation/documentation/AppKit/NSAccessibilityStrikethroughTextAttribute>

  <doc://com.apple.documentation/documentation/AppKit/NSAccessibilityStrikethroughColorTextAttribute>

  <doc://com.apple.documentation/documentation/AppKit/NSAccessibilitySuperscriptTextAttribute>

  <doc://com.apple.documentation/documentation/AppKit/NSAccessibilityUnderlineTextAttribute>

  <doc://com.apple.documentation/documentation/AppKit/NSAccessibilityUnderlineColorTextAttribute>

  <doc://com.apple.documentation/documentation/UIKit/UIAccessibilityTextAttributeContext>

### Getting Markdown attribute keys

[`inlinePresentationIntent`](/documentation/Foundation/NSAttributedString/Key/inlinePresentationIntent)

An attribute that provides details for an inline Markdown element.

[`presentationIntentAttributeName`](/documentation/Foundation/NSAttributedString/Key/presentationIntentAttributeName)

An attribute that provides details for a block-level Markdown element.

[`markdownSourcePosition`](/documentation/Foundation/NSAttributedString/Key/markdownSourcePosition)

The position in a Markdown source string corresponding to some attributed text.

[`alternateDescription`](/documentation/Foundation/NSAttributedString/Key/alternateDescription)

An alternate description for a URL or image.

[`imageURL`](/documentation/Foundation/NSAttributedString/Key/imageURL)

The URL for an image in Markdown text.

### Getting translation-related attribute keys

[`languageIdentifier`](/documentation/Foundation/NSAttributedString/Key/languageIdentifier)

The language identifier associated with the range of text.

[`morphology`](/documentation/Foundation/NSAttributedString/Key/morphology)

An attribute that contains grammatical properties to apply to the text.

[`inflectionRule`](/documentation/Foundation/NSAttributedString/Key/inflectionRule)

An attribute that tells the system how to apply grammar rules and other modifiers to the range of text.

[`inflectionAlternative`](/documentation/Foundation/NSAttributedString/Key/inflectionAlternative)

The alternative translation for a string when no suitable inflection exists.

[`agreeWithArgument`](/documentation/Foundation/NSAttributedString/Key/agreeWithArgument)

An attribute key whose value indicates inflection agreement with a specific argument.

[`agreeWithConcept`](/documentation/Foundation/NSAttributedString/Key/agreeWithConcept)

An attribute key whose value indicates inflection agreement with a specific concept.

[`referentConcept`](/documentation/Foundation/NSAttributedString/Key/referentConcept)

An attribute key whose value indicates the referent concept for inflection.

[`localizedNumberFormat`](/documentation/Foundation/NSAttributedString/Key/localizedNumberFormat)

An attribute key whose value specifies a localized number format.

### Getting formatting attribute keys

[`listItemDelimiter`](/documentation/Foundation/NSAttributedString/Key/listItemDelimiter)

The delimiter used when declaring the current list item.

### Getting writing tools attribute keys

[`writingToolsExclusionAttributeName`](/documentation/Foundation/NSAttributedString/Key/writingToolsExclusionAttributeName)

### Deprecated Keys

[`expansion`](/documentation/Foundation/NSAttributedString/Key/expansion)

The expansion factor of the text.

[`obliqueness`](/documentation/Foundation/NSAttributedString/Key/obliqueness)

The obliqueness of the text.

[`verticalGlyphForm`](/documentation/Foundation/NSAttributedString/Key/verticalGlyphForm)

The vertical glyph form of the text.

[`characterShapeAttributeName`](/documentation/Foundation/NSAttributedString/Key/characterShapeAttributeName)

The character shape attribute.

[`usesScreenFontsDocumentAttribute`](/documentation/Foundation/NSAttributedString/Key/usesScreenFontsDocumentAttribute)

The screen fonts attribute.

### Deprecated Keys

  <doc://com.apple.documentation/documentation/UIKit/NSExpansionAttributeName>

  <doc://com.apple.documentation/documentation/UIKit/NSObliquenessAttributeName>

  <doc://com.apple.documentation/documentation/UIKit/NSVerticalGlyphFormAttributeName>

  <doc://com.apple.documentation/documentation/AppKit/NSCharacterShapeAttributeName>

  <doc://com.apple.documentation/documentation/AppKit/NSUsesScreenFontsDocumentAttribute>

### Initializers

[`init(_:)`](/documentation/Foundation/NSAttributedString/Key/init(_:))

Creates an attributed string key.

[`init(rawValue:)`](/documentation/Foundation/NSAttributedString/Key/init(rawValue:))

Creates an attributed string key with the specified raw value.



---

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)