# Embed instructions

An instruction is how you configure the embed. These instructions can be added immediately after the embed snippet

An instruction is technically a function with the same name, that would be called with the given arguments.&#x20;

You would not normally need to learn about these instructions in details as the **Embed Snippet Generator**, automatically updates the snippet with these instructions in the way you configure it.

#### `inline`

Appends embed inline as the child of the element.

```html
<script>
Cal("inline", { elementOrSelector, calLink });
</script>
```

* `elementOrSelector` - Give it either a valid CSS selector or an HTMLElement instance directly
* `calLink` - Cal Link that you want to embed e.g. john. Just give the username. No need to give the full URL <https://cal.com/john>. It makes it easy to configure the calendar host once and use as many links you want with just usernames

#### `ui`

Configure UI for embed. Make it look part of your webpage.

```html
<script>
Cal("ui", { styles });
</script>
```

* `styles` - It supports styling for `body` and `eventTypeListItem`. Right now we support just background on these two.

#### preload

Usage:

If you want to open cal link on some action. Make it pop open instantly by preloading it.

```html
<script>
Cal("preload", { calLink });
</script>
```

* `calLink` - Cal Link that you want to embed e.g. john. Just give the username. No need to give the full URL <https://cal.com/john>


---

# 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://calcom.gitbook.io/docs/core-features/new-docs-embed/embed-instructions.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.
