---
title: "UrlAnnotation"
description: "An annotation that contains the metadata intended for text-to-speech engine. If the text is being
processed by a text-to-speech engine, the engine may use the data in this annotation in addition
to or instead of its associated text.

Note: this is now deprecated. In order to display a link in the text, add a [LinkAnnotation] to
the AnnotatedString and pass it to the Text composable function"
type: "class"
---

<div class='type'>Class</div>


<a id='references'></a>

<div class='sourceset sourceset-common'>Common</div>


> **Deprecated** Use LinkAnnotatation.Url(url) instead

```kotlin
@ExperimentalTextApi
class UrlAnnotation(val url: String) : AnnotatedString.Annotation
```


An annotation that contains the metadata intended for text-to-speech engine. If the text is being
processed by a text-to-speech engine, the engine may use the data in this annotation in addition
to or instead of its associated text.

Note: this is now deprecated. In order to display a link in the text, add a `LinkAnnotation` to
the AnnotatedString and pass it to the Text composable function



