> For the complete documentation index, see [llms.txt](https://docs.visualyze.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.visualyze.ai/rpa-studio/file/xml/get-html-element.md).

# Get HTML Element

Gets a specific element from a given HTML.

This activity retrieves a specific element from a user-specified HTML code based on the given XPath.

### Input

* **Input:** [`String Argument`](/getting-started/rpa-studio/arguments.md#string) <mark style="color:red;">`Required`</mark>\
  Set HTML as input to a variable.
* **XPath:** [`String Argument`](/getting-started/rpa-studio/arguments.md#string) <mark style="color:red;">`Required`</mark>\
  Input the XPath of the element to be read.
* **Index:** [`Integer Argument`](/getting-started/rpa-studio/arguments.md#string)\
  Specifies the index from which the HTML element is to be retrieved. Used with Mode **`AtIndex`**.
* **Decode Html:** [`Boolean Argument`](/getting-started/rpa-studio/arguments.md#types-of-arguments)\
  Specifies whether to apply text preprocessing to decode Html to convert Html entities on the Html input.
* **Method:**\
  Select the method to retrieve the value. First, select the value from the first occurrence of the key. All retrieves all key values as a collection. These are the available options.
  * `First` - The first occurrence of the values of the given HTML attribute is selected.
  * `AtIndex` - The values of the given HTML attribute at the specified index are selected.
  * `All` - All the values of the given HTML attribute are selected.

### Output

* **Result:** [`String Variable`](/getting-started/rpa-studio/variables.md#string)\
  Stores the values of the given HTML element in the specified [String ](/getting-started/rpa-studio/variables.md#string)variable
