---
title: defaultAttributes
framework: foundation
role: symbol
role_heading: Type Property
path: foundation/nsattributedstring/documentattributekey/defaultattributes
---

# defaultAttributes

The default document attributes.

## Declaration

```swift
static let defaultAttributes: NSAttributedString.DocumentAttributeKey
```

## Discussion

Discussion The value of this attribute is an NSDictionary object containing attributes to be applied to plain files. Used by reader methods. This key in options can specify the default attributes applied to the entire document contents. Upon return, the document attributes can contain this key indicating the actual attributes used. The string constant in macOS 10.3 and earlier is @"DefaultAttributes".
