# Get element text

1. Place the `Charles: Element text` element on the page
2. Give it a value for the selector that matches the element you want to select, eg. `h1` for the h1 title element:

<div align="left"><figure><img src="/files/BWNVxPTyAimjPBf6x01W" alt=""><figcaption></figcaption></figure></div>

Please note that Charles will automatically select the first element that matches the selector.

Learn more about CSS selectors:

* <https://www.w3schools.com/jsref/met_document_queryselector.asp>
* <https://www.w3schools.com/css/css_selectors.asp>
* <https://www.w3schools.com/cssref/css_selectors.php>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://cranford-tech.gitbook.io/charles/key-features/get-element-text.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
