---
title: attributedString()
framework: webkit
role: symbol
role_heading: Instance Method
path: webkit/webdocumenttext/attributedstring()
---

# attributedString()

Returns the entire content of the web document as an attributed string.

## Declaration

```swift
func attributedString() -> NSAttributedString!
```

## Return Value

Return Value An attributed string containing the entire content of the web document.

## See Also

### Getting document content

- [string()](webkit/webdocumenttext/string().md)
