> For the complete documentation index, see [llms.txt](https://learnpython.strivemath.com/p5-python-web/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://learnpython.strivemath.com/p5-python-web/reference/text/text.md).

# text()

## Description

The text function draws a text on the canvas at the specified location. The object drawn on the canvas is a shape that has an internal region which can be colored with `fill()` and a boundary which can be colored by `stroke()`.

```
text(sentence, x, y)
```

<table><thead><tr><th width="132">Input</th><th>Description</th></tr></thead><tbody><tr><td>sentence</td><td>The content of the text. It can be any type of data, though we usually use strings.</td></tr><tr><td>x</td><td>the x-coordinate of the text box</td></tr><tr><td>y</td><td>the y-coordinate of the text box</td></tr></tbody></table>

## Examples

```python
    text("Hello, Strive!", 15, 25)
    text('This\'s been\n running for' , 15, 50)
    
    fill(255)
    text(f'{round(millis()/1000)} seconds', 15, 85)
```

<figure><img src="/files/gttKabNhwS65tuzUFhv7" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
Find these documents helpful? Let the people who made them help your child learn to code at [**Strivemath**](https://www.strivemath.com/)<mark style="color:blue;">**!**</mark>

We'd love to hear your Feedback/Comments [here](https://docs.google.com/forms/d/e/1FAIpQLSeqorBAGTya-YBRI-VFjJxtgQtCz3ucGDI96K96sNyuaGuvdw/viewform?usp=sf_link).
{% endhint %}
