> 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`). > - 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).