# Substack Embed — HTML

> Copy-paste HTML snippets to add a Substack subscribe form or feed widget to any website. Works with any site builder or static HTML file.

Source: https://supascribe.com/examples/html

---
When you click **Copy embed code** in your [Supascribe dashboard](https://supascribe.com), you get a snippet with your embed ID and script URL already filled in — paste it directly. The examples below show the structure.

The only difference between the [subscribe form](https://supascribe.com/embeds/subscribe) and the [feed widget](https://supascribe.com/embeds/newsfeed) is a single attribute.

## Subscribe Form

```html
<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>My Site</title>
  </head>
  <body>
    <!-- Subscribe form -->
    <div
      data-supascribe-embed-id="abc123"
      data-supascribe-subscribe
    ></div>

    <!-- Script — add once per page, URL is in your dashboard snippet -->
    <script
      src="https://js.supascribe.com/v1/loader/example.js"
      async
    ></script>
  </body>
</html>
```

## Feed Widget

```html
<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>My Site</title>
  </head>
  <body>
    <!-- Feed widget -->
    <div
      data-supascribe-embed-id="abc123"
      data-supascribe-feed
    ></div>

    <!-- Script — add once per page, URL is in your dashboard snippet -->
    <script
      src="https://js.supascribe.com/v1/loader/example.js"
      async
    ></script>
  </body>
</html>
```

`data-supascribe-subscribe` renders the subscribe form. `data-supascribe-feed` renders the feed widget.

## Both on the same page

One script tag handles both. Place the divs anywhere in the body.

```html
<body>
  <!-- Subscribe form -->
  <div data-supascribe-embed-id="abc123" data-supascribe-subscribe></div>

  <!-- Feed widget -->
  <div data-supascribe-embed-id="abc123" data-supascribe-feed></div>

  <!-- Single script handles both -->
  <script src="https://js.supascribe.com/v1/loader/example.js" async></script>
</body>
```

## Working with a website builder?

See the platform guides for step-by-step instructions:

- [WordPress](https://supascribe.com/docs/embed-substack-on-wordpress): Add using a Custom HTML block.
- [Carrd.io](https://supascribe.com/docs/embed-substack-on-carrd-io): Add using an Embed element.
- [Squarespace](https://supascribe.com/docs/embed-substack-on-squarespace): Add using a Code block.
- [Wix](https://supascribe.com/docs/embed-substack-on-wix): Add using the HTML Embed element.
- [Shopify](https://supascribe.com/docs/embed-substack-on-shopify): Add using a Custom HTML block or theme template.
