Updated: May 14, 2026
Using HTML in the Website Builder
Article Contents
The Website Builder supports custom HTML blocks, giving you the flexibility to embed interactive content, third-party widgets, and custom-styled components directly on your site. This article includes a video tutorial that walks you through how to create custom website components using AI in the Website Builder, plus covers how HTML blocks work, what's supported, and what to keep in mind when working with custom code.
Watch and learn: How to create custom website components with AI
Things you can do with HTML blocks
HTML blocks in the Website Builder let you go beyond the built-in elements to add truly custom experiences to your site. Some popular use cases include:
- Embedding third-party widgets like social proof tools, social posts, or video players.
- Adding a stock ticker or live data feed.
- Creating custom-styled sections with Tailwind CSS classes.
- Embedding iFrames from external sources.
Be sure to check out Very Good Components for inspiration on what’s possible with HTML in the beehiiv Website Builder.
What's supported in an HTML block
| Feature | Supported | Notes |
| iFrames | ✓ | Fully supported |
| <video> tag | ✓ | Fully supported |
| Custom Tailwind CSS | ✓ | Scoped to your HTML block |
| Interactive widgets (ticker tape, Senja, X posts, YouTube) | ✓ | Test in Preview to confirm behavior |
| <!DOCTYPE>, <html>, <head>, <body> tags | ✗ | Full document structure not allowed |
| Global CSS resets (*, body, html) | ✗ | May break page layout |
| Viewport-controlling styles (100vh, position: fixed) | ✗ | May conflict with page structure |
Adding an HTML block to your site
- From the left panel, go to Website > Builder. The Website Builder will open with your site on the canvas.
- Navigate to the page and section where you want to add your custom HTML.
- Click the + icon in the left panel to open the Elements modal. Under Advanced blocks, select HTML and drag it onto the canvas.
Using AI to configure the HTML
- With the HTML block selected on the canvas, click on Configure in the right design panel to open the code editor.
- The HTML modal will open on the AI HTML Block option. Describe what you want to create on the right, and see the preview on the left.
The AI will ask you questions to ensure you get exactly what you want. As you chat, you’ll be switched over to the Code tab, where your custom code will populate. - Return to the preview tab to see your new custom code creation in action. If you like what you see, click on Save to return to your canvas, or continue chatting until satisfied.
To start over, simply click on Reset.
For more on using the AI in the website builder as well as info on the AI credits included with your beehiiv plan, read Using AI chat to build your website.
Using your own HTML code
- If you prefer to code manually, click into the Code tab. Enter your code, and when it’s as you prefer, return to the Preview tab to test how your code renders.
- Once you’re happy with your code snippet, click on Save to return to your canvas.
Structural requirements to consider
HTML blocks are not full web pages — they are fragments injected into an existing page. Keep the following requirements in mind when writing your code.
Use a single container div
Your HTML must begin with a single container <div> that wraps all of your content and styles. This keeps your code scoped and prevents it from affecting other elements on the page.
No full document structure
Do not include <!DOCTYPE>, <html>, <head>, or <body> tags. These are already part of the page your HTML block lives within, and including them will cause rendering issues.
Avoid global CSS resets
Styles that target *, body, or html can override the rest of your site's design. Always scope your styles to your container class to avoid unintended side effects. Similarly, avoid viewport-controlling styles like 100vh or position: fixed, as these may conflict with the overall page structure.
Adding stylesheets
The HTML block does not support a <head> tag, so you cannot link external stylesheets using the standard document <head> approach. As a workaround, you can add <link> tags directly inside your HTML block.
Character and size limits
The editor has a 50,000 character limit, which applies to the total content in the editor — not to individual HTML blocks. Very large HTML blocks may also experience rendering issues independently of this limit.
Frequently asked questions about HTML blocks in the Website Builder
Can I use iFrames in the Website Builder?
My styles are affecting other parts of the page. How do I fix this?
How do I add an external stylesheet?
Can I use Tailwind CSS in HTML blocks?
My HTML block looks broken in the editor, how do I fix it?
Was this article helpful?
Related Articles