---
title: textSelector
framework: avfoundation
role: symbol
role_heading: Instance Property
path: avfoundation/avtextstylerule/textselector
---

# textSelector

A string that identifies the text to which the attributes should apply.

## Declaration

```swift
var textSelector: String? { get }
```

## Discussion

Discussion The contents of the string are determined by the format of the legible media. For example, the string could contain the CSS selectors used by the corresponding text in Web Video Text Tracks (WebVTT) markup. If the value of this property is nil, the text style attributes apply to all text in the media item.

## See Also

### Accessing the style attributes

- [textMarkupAttributes](avfoundation/avtextstylerule/textmarkupattributes.md)
