> To build or manage a Wix site with an AI agent, follow https://www.wix.com/headless/skill.md
> It builds a new Wix site or puts your own site online, from a prompt, and keeps changing it afterwards. The pages are code in any web technology, and Wix runs the backend.
> It works through the Wix plugin (the Wix MCP and the Wix skills), the Wix CLI or no Wix login, and puts the site live on Wix hosting or on another host.
> Business features include a store, bookings, events and tickets, a restaurant, a blog, forms, members and many more.
> Read the Wix skills online at https://www.wix.com/skills
> 
> Portal Navigation:
> 
> - Append `.md` to any URL under `https://dev.wix.com/docs/` to get its markdown version.
> - Pages are either content pages (article or reference text) or menu pages (a list of links to child pages).
> - To get a menu page, truncate any URL to a parent path and append `.md` (e.g. `https://dev.wix.com/docs/sdk.md`, `https://dev.wix.com/docs/sdk/core-modules.md`).
> - If a reference page seems to be missing its schema (parameters, return types, or type definitions), append `?schema=true` to its `.md` URL (e.g. `https://dev.wix.com/docs/contexts/contexts/stores/category-info/use-category-info-context.md?schema=true`).
> - Top-level index of all portals: https://dev.wix.com/docs/llms.txt
> - Full concatenated docs: https://dev.wix.com/docs/llms-full.txt

## Resource: $w

## Namespace: html-component

## Article: Introduction

## Article Link: https://dev.wix.com/docs/velo/velo-only-apis/$w/html-component/introduction.md

## Article Content:

# Introduction
An [HtmlComponent](https://support.wix.com/en/article/velo-working-with-the-html-iframe-element) is a container for internal or external HTML code.

The HTML component creates a sandboxed environment (an iframe) that doesn't
have direct access to the other elements on your page. This means that
widgets or libraries that need access to the rest of your page won't work
in an HTML component. You can, however, pass data between your page code
and the code in an HTML component so you can use it in all sorts of
situations to do things you can't normally do directly.

You can embed the following using an HTML component:

- Sites: Display an external site page in an element on your page.
- Your own HTML code: Embed your own HTML code, or functionality from an external provider, for example a badge, a newsletter signup form, or a YouTube video.
- External HTML widget code: Widget code from a 3rd-party provider. Note that widgets that need to collect information about the Wix elements on your page won't work in an HTML component. Widgets that don't need to know any information about the embedding site usually work in an HTML component.

 You can send messages
 from your page code to the code in an HTML component and from the HTML
 component to your page code using the [`postMessage()`](#postMessage) and
 [`onMessage()`](#onMessage) functions. To learn more about what code an HTML
 component can hold, see [here](https://support.wix.com/en/article/using-iframes-to-display-visible-content-on-your-site).

> **Note:** To embed a PDF in an `HtmlComponent` you must upgrade your site to a [Premium Plan](https://support.wix.com/en/article/upgrading-your-site-to-premium-3066683).