Editing HTML in Elementor allows you to insert custom HTML code into your pages, providing greater flexibility for advanced customizations. This feature is particularly useful for embedding third-party scripts, adding custom functionality, or tweaking elements beyond Elementor’s default options. Here’s how to edit HTML in Elementor:
Step 1: Open the Elementor Editor
- Log in to your WordPress dashboard.
- Navigate to the page or post you want to edit.
- Click Edit with Elementor to launch the Elementor editor.
![](https://support.creedcreatives.net/wp-content/uploads/2025/01/Elementor-fix-12-1-1024x444.png)
Step 2: Add the HTML Widget
- In the Elementor editor, go to the Widget Panel on the left-hand side.
![](https://support.creedcreatives.net/wp-content/uploads/2025/01/Elementor-fix-14.png)
- Search for the HTML Widget in the search bar.
![](https://support.creedcreatives.net/wp-content/uploads/2025/01/Elementor-fix-14.2-1024x486.png)
- Drag and drop the HTML Widget onto the desired section of your page.
Step 3: Enter Your Custom HTML Code
- Once the HTML widget is added, a code editor will appear in the widget panel on the left.
![](https://support.creedcreatives.net/wp-content/uploads/2025/01/Elementor-fix-14.3.png)
- Enter your custom HTML code directly into the editor. Examples of what you can add include:
- Embedding forms, iframes, or videos.
- Custom CSS or JavaScript (though these are better handled with the Custom Code feature for performance and organization).
- Adding specific HTML tags like
<div>
,<span>
,<h1>
, etc.
![](https://support.creedcreatives.net/wp-content/uploads/2025/01/Elementor-fix-14.4.png)
Step 4: Preview Your Changes
- As you type your HTML code, Elementor will render the output in real-time in the preview area.
![](https://support.creedcreatives.net/wp-content/uploads/2025/01/elementor-fix-10.10-2.png)
- Ensure that the code appears as intended and does not conflict with other design elements.
Step 5: Style Your Custom HTML (Optional)
- Add Custom Classes or IDs:
Includeclass
orid
attributes in your HTML code if you plan to style it with custom CSS or target it with JavaScript. - Apply Inline Styling:
You can use inline CSS within your HTML code, but for better performance and maintainability, use the Additional CSS feature in your WordPress Customizer or a child theme.
Step 6: Save and Publish
- Once you’re satisfied with the custom HTML, click Update to save your changes.
![](https://support.creedcreatives.net/wp-content/uploads/2025/01/elementor-fix-11.56-2.png)
- Preview your page to confirm that everything works as expected.
Tips for Editing HTML in Elementor
- Use Third-Party Scripts Cautiously: When embedding scripts (e.g., Google Maps, analytics, or third-party widgets), ensure they are from trusted sources to avoid security issues.
- Mobile Responsiveness: Test your custom HTML on different screen sizes using Elementor’s responsive mode.
- Avoid Overloading the Page: Minimize excessive custom code to maintain your website’s performance.
- Debugging: If the HTML output doesn’t appear as expected, check your code syntax for errors.
When to Use the HTML Widget
- Integrating third-party tools or custom functionality.
- Adding external embeds like YouTube videos, iframes, or maps.
- Inserting custom forms, widgets, or scripts.