# Switch Tab Block

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

The Switch Tab block allows you to switch to a specific browser tab. The following settings are available for searching and switching to the tab:

* **Match Patterns.** The tab is searched by a template. For example, a Switch Tab block with a template <https://google.com> /\* switches to the tab with the site open in it google.com . More template examples are available on the [MDN Page](https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/Match_patterns#examples). his setting has several sub-items:

1. **Create if there's no match.** If a template tab is not found, a new tab is created.
2. **Set as active tab.** This setting allows the browser to switch to a newly created tab, as a person does to view a site page.

* **Tab title.** Switch to the tab by the tab title. This setting has several sub-items as in the previous setting.
* **Next Tab.** Go to the next tab of the active tab. Can be set as an active tab.
* **Previous Tab.** Go to the previous tab of the active tab. Can be set as an active tab
* **Tab Index.** Proceed to the tab based on its index position. For instance, assume that four tabs are opened (Google, GitHub, Chess, and Microsoft). Then, if you need to open the Google tab, you can enter 0. For the GitHub tab, enter 1, etc.


---

# 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/browser/switch-tab-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.
