# 3. Using the Variables

Once your SyncVariables are configured, you can easily display them on your website using the `data-variable` attribute.

Use `data-variable="variableName"` wherever you want the variable's value to appear, replacing `variableName` with the name you set in the dashboard.

### Example 1

If you named your variable `orderCount`, you can display it like this:

```html
<h1>Amount of orders: <span data-variable="orderCount"></span></h1>
```

This code will automatically fetch and display the latest value of `orderCount` within the `<span>` tag.

### Example 2

You can also apply custom styling to the displayed text. For example:

```html
<span class="text-3xl font-switzer font-black" data-variable="orderCount"></span>
```

In this example, the `orderCount` value will be displayed with large, bold, and custom-styled text.

The `data-variable` attribute can be used within any HTML element to dynamically update your website with real-time data.


---

# 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://syncvariables.gitbook.io/syncvariables-documentation/getting-started/3.-using-the-variables.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.
