> For the complete documentation index, see [llms.txt](https://cranford-tech.gitbook.io/charles/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://cranford-tech.gitbook.io/charles/key-features/get-element-html.md).

# Get element HTML

1. Place the `Charles: Element HTML` element on the page
2. Give it a value for the selector that matches the element you want to select, eg. `html` to select the whole html document:

<div align="left"><figure><img src="https://1746625412-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FR8XSg57nbIyYLBX9iJLb%2Fuploads%2FZM7BJurcTMYDu0NsNQvB%2Fimage.png?alt=media&amp;token=179c2995-1038-4d84-88c8-e2276f9d7aae" 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>
