How to add HTML code to Tilda: block T123, Zero Block and common mistakes
Step by step: where to put HTML, CSS and JavaScript in Tilda, why code does not run in the editor, and how to add an animated component to a page.

Tilda lets you add any custom element: an animated button, a widget, a menu or an effect. There is a dedicated block for HTML code. Here is how to use it and what to do when code “does not work”.
Where to put the code
- Block T123 “HTML code” in the block library, Other section. Fits most components.
- The HTML element inside Zero Block, when the component must sit in an exact spot.
- Page settings → Additional → HTML code for HEAD, for scripts needed on one page.
- Site settings → More → HTML code for HEAD, for code needed on every page.
Step by step: block T123
- Open the page and click All blocks.
- Choose Other → T123 Embed HTML code.
- Click Content and paste the code.
- Save and publish.

Why code does not run in the editor
That is normal. In edit and preview modes Tilda shows HTML as text and does not run it. Check on the published page: most “broken” code actually works there.
What you can paste
HTML, CSS inside a style tag and JavaScript inside a script tag. Server code like PHP is not executed; use webhooks for data.
<div class="my-button">Get in touch</div>
<style>
.my-button { padding: 16px 28px; border-radius: 28px; }
</style>
<script>
// button animation
</script>Common mistakes
- The code is copied partially and the closing script tag is lost.
- The same component is pasted twice and scripts conflict.
- An external library does not load: prefer code with no dependencies.
- Checking in preview instead of the published page.
The fastest way
Every component in our catalog is built to fit T123 as one block, with no libraries or extra files. Tap Tilda in the bot, copy, paste, done.

Text, colors and sizes usually live in the first lines of the code. For more, give the code and the archive prompt to an AI.




