- Short answer
- Use the rich text editor's HTML view or Custom Liquid if your theme has it; edit theme code only as a last resort.
- Custom Liquid in Shopify's own themes
- Horizon: block and section. Dawn: section, plus a block in its main and featured product sections (October 11, 2026).
- Iframes in Custom Liquid
- No Shopify page we read says whether Custom Liquid allows or blocks them.
- Shopify Support
- Won't write custom code or troubleshoot content added to the rich text editor.
Which of the three places fits your HTML?
Choose by where the HTML must appear: HTML for one item goes in the content editor, HTML for a place in the theme, such as the product page or the header, goes in Custom Liquid if your theme offers it, and theme code comes last.
Three places to paste HTML in Shopify
| Place | Where the HTML shows | Available when | Watch for |
|---|---|---|---|
| Rich text editor (Show HTML / Edit code) | The page, product, collection or blog post you are editing | Whenever you edit one of them in the admin | Display errors; a 64 KB limit on pages and blog posts |
| Custom Liquid section or block (theme editor) | Where you place it; in the header or footer, on every page | Only if your theme offers it | The setting behind it has a 50kb limit; saving invalid Liquid gives an error |
| Theme code editor (Edit code) | The theme files themselves | Only after you've purchased the theme | Needs HTML, CSS and basic Liquid; if your code changes are incompatible with a theme update, all of them are removed in the updated copy |
Source: Shopify Help Center and shopify.dev, read October 11, 2026.
How do you add HTML to a page, product, collection or blog post?
Shopify's rich text editor takes HTML for blog posts, pages, product descriptions and collection descriptions. Click its code button, which the Help Center calls both Show HTML and Edit code. A product's Description field uses this same editor.
With HTML you can add images, videos or tables and fine-tune the layout. A video or music widget has to be hosted first on a service like YouTube, Vimeo or SoundCloud before you paste its embed code. Shopify's pages guide uses a Google Maps <iframe> as its example.
The risk is on the storefront: HTML in this editor might cause display errors, and content copied from another site can bring unwanted HTML that does the same.
The editor also corrects HTML formatting automatically, and content has a hard limit of 64 KB on pages, blog posts and additional scripts.
When can you use a Custom Liquid section or block?
Only when your theme has one: Shopify's advice on app code begins “if your theme offers a Custom Liquid section”, and its Shop Promise guide notes that not all themes support Custom Liquid blocks.
In Shopify's own theme code as of October 11, 2026, Horizon has Custom Liquid as both a block and a section, and Dawn has it as a section and as a block inside its main product and featured product sections. Themes in the Shopify Theme Store must include a Custom Liquid section.
Placement decides reach. The header and footer are shared across all of your online store's pages, so a Custom Liquid block in the header displays on every product page, the home page and any other page.
Where a theme supports custom blocks, Shopify's guide has you add the Shop Promise module to the product page with a Custom Liquid block, without editing theme code. For a script from an admin-created custom app that you maintain, Shopify's developer guidance is a custom Liquid block where possible, or the code editor if you need to.
The setting behind Custom Liquid accepts HTML and limited Liquid. Content can't exceed 50kb, and saving content over that limit or with invalid Liquid results in an error.
None of the Help Center pages we read on October 11, 2026, from the rich text editor to the theme editor and Edit code guides, describes Custom Liquid itself. None of them, nor the shopify.dev theme settings and Theme Store pages, names <script> or <iframe> tags as allowed or blocked in it; the script-tag guidance above sends an admin-created custom app's script there.
When is the theme code editor the right place?
Last. Shopify's own rule puts it after a Shopify app and the theme editor:
You should only edit your theme's code if you can't make the changes that you need by using a Shopify app or by using the theme editor.
It also asks for skills: edit the code only if you know HTML and CSS and have a basic understanding of Liquid. Without web-development experience, Shopify suggests hiring a Shopify Partner.
The price is upkeep. If your code changes are incompatible with a theme update, all of them are removed in the updated copy, and Shopify's script-tag guidance adds that editing theme code takes the theme off its automatic upgrade path. Before you count on rolling back, check how much a code edit can be undone.
Support won't fill the gap. Shopify Support doesn't write custom code, troubleshoot third-party code, or customize or troubleshoot content added to the rich text editor.
This page was written by AI. Separate AI agents that did not write it check its figures and claims against official sources and test its links and interactive tools. A human editor sets the site's editorial direction, topics and rules and checks that pages are complete and display correctly, but does not check their facts or edit their text. Details may change — always confirm critical data at shopify.com.
Editorial Policy