Easy Tech Tuts
Elementor

How To Add HTML Code To Elementor Wordpress 2026 Easily

By Impran M N

Elementor's HTML widget makes it possible to drop in custom code, embed external widgets, or add scripts without touching your theme's files directly. This guide covers adding the HTML widget to your page, pasting in your code, and applying CSS or JS styling so it fits the rest of your design. The method works with both the free and Pro versions of Elementor across WordPress themes.

01Open the Elementor editor

Launch the Elementor editor on the page where you want to add custom HTML.

02Add the HTML widget

Search for the HTML widget in Elementor's widget panel and drag it onto the section of your page where the code should appear.

03Paste your custom HTML code

Enter your HTML code, embed snippet, or script directly into the widget's code field.

04Apply CSS or JS styling if needed

Add any additional CSS or JavaScript required to style the embedded element so it matches the rest of your page.

05Save and preview the page

Save your changes and preview the page to confirm the custom HTML displays and functions correctly before publishing.

FAQ

Frequently asked questions

Do I need Elementor Pro to add HTML code to my page?

No, the HTML widget is available in both Elementor Free and Elementor Pro, so you don't need the paid version just to embed custom code.

Can adding custom HTML break my WordPress site?

Poorly formatted or conflicting code can cause display issues, so it's worth previewing changes before publishing and undoing anything that looks off.

Can I add JavaScript through the Elementor HTML widget, not just HTML?

Yes, the HTML widget accepts script tags along with HTML, so you can embed JavaScript-driven widgets or custom functionality the same way.

Will custom HTML added through Elementor work with any WordPress theme?

Yes, since the HTML widget renders independently of the theme's templates, it should work consistently across different WordPress themes.

Watch the full walkthrough

The same steps, demonstrated on screen from start to finish.