# Link Block

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

Open the URL with an [anchor](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a) element (\<a>).

An anchor element may have the [target="\_blank"](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a#attr-target) attribute. It will open a new tab when you click on it using the Click element block. GoLess won't execute the next block on a new tab because it opened a new tab.

To solve this problem, you must use the Link block. It will catch the anchor URL and open it in the same tab.

Note

This block will not work without an active tab. Because of that, use the Active Tab block or New Tab block before using this block.

A screenshot of the settings is located below:

<figure><img src="/files/1NUsaLT567LjumfMNyeu" alt=""><figcaption></figcaption></figure>

The block has two modes of operation: CSS Selector or XPatch. In the first mode, the block must receive a css selector of the page element for its operation. In the second mode, the block receives the Xpath of the element. To get a selector, you can use the Element selector tool of the Goless extension.&#x20;

* Settings of the **Selector options** group:

1. **Mark element.** The item will not be selected if it was selected earlier.
2. **Wait for selector.** Wait for the selector to be received. When you select this element, you can enter the timeout of the selector.

* **Open in new tab.** The setting allows you to open the URL in a new tab.


---

# 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://docs.goless.com/blocks/web-interaction/link-block.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.
