> ## Documentation Index
> Fetch the complete documentation index at: https://docs.x.com/llms.txt
> Use this file to discover all available pages before exploring further.

# X Widgets Webpage Properties

> Configure X widget defaults across a site with meta and link elements, including dnt, lang, in-reply-to, and other webpage-level widget properties.

Set widget preferences across an entire website by including `<meta>` and `<link>` elements in your pages page.

Widget settings specified in a `<meta>` may be overridden at the individual widget level. Order of precedence:

1. web intent link query parameter
2. widget attribute
3. meta or link element

## Turn off DOM scan for widgets and buttons

The X for Websites JavaScript scans `document.body` after initialization to locate buttons, widgets, and web intents for enhancement. Turn off this scan if X content is only loaded via [JavaScript factory functions](/x-for-websites/javascript-api/guides/set-up-x-for-websites) or if you prefer to directly [call load](/x-for-websites/javascript-api/guides/scripting-loading-and-initialization) on a smaller fragment of the page.

```html theme={null}
<meta
  name="twitter:widgets:autoload"
  content="off">
```

## Canonical link

The [Post button](/x-for-websites/post-button/overview) uses the [canonical link relation of the page](http://tools.ietf.org/html/rfc6596) expressed in a `<link>` as the shared URL if the URL property is not set in the button markup.

Add a canonical link in the `<head>` section of your webpage.

```html theme={null}
<link
  rel="canonical"
  href="/">
```

## Identify the X profile of the page

Populate the `via` property of a Tweet button by linking to your X profile page with a me link relationship token.

Set a `me` link relationship in the `<head>` section of your webpage.

```
<link
  rel="me"
  href="https://x.com/XDevelopers">
```

You may also set a `me` relationship from an anchor element on your page, such as a Follow button.

```html theme={null}
<a
  class="x-follow-button"
  rel="me"
  href="https://x.com/XDevelopers">
Follow @XDevelopers
</a>
```

## Theme

Override the default `light` theme preference for an [embedded Post](/x-for-websites/embedded-posts/overview) or an [embedded Timeline](/x-for-websites/timelines/overview).

```html theme={null}
<meta
  name="twitter:widgets:theme"
  content="dark">
```

## Do not track parameter

You may choose whether X widgets on your site help to personalize content and suggestions for X users, including ads. You can opt out of having information from your website used for personalization by following the instructions below. Include the following snippet within the `<meta>` and `<link>` elements on your pages that include X for Websites widgets:

```html theme={null}
<meta name="twitter:dnt" content="on">
```

You may also opt-out of this data use for a specific widget, and can do so by setting the optional `data-dnt` parameter to be true, as shown in the example below:

```html theme={null}
<a
  class="twitter-share-button"
  href="https://x.com/share"
  data-dnt="true">
Tweet</a>
<script async defer
  src="//platform.x.com/widgets.js"
  charset="utf-8">
</script>
```

## Turn off functionality which may trigger Content Security Policy warnings

An embedded Tweet or embedded Timeline may display with restricted capabilities when a [Content Security Policy](http://en.wikipedia.org/wiki/Content_Security_Policy) restricts inline loading of X. Set `csp=on` to turn off functionality which could display Content Security Policy warnings on your site.

```html theme={null}
<meta
  name="twitter:widgets:csp"
  content="on">
```
