Edit HTML in Elementor

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.

Step 2: Add the HTML Widget

  • In the Elementor editor, go to the Widget Panel on the left-hand side.
  • Search for the HTML Widget in the search bar.
  • 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.
  • 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.

Step 4: Preview Your Changes

  • As you type your HTML code, Elementor will render the output in real-time in the preview area.
  • 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:
    Include class or id 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.
  • Preview your page to confirm that everything works as expected.

Tips for Editing HTML in Elementor

  1. 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.

  2. Mobile Responsiveness: Test your custom HTML on different screen sizes using Elementor’s responsive mode.

  3. Avoid Overloading the Page: Minimize excessive custom code to maintain your website’s performance.

  4. 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.

Help Center

How can we help?

Table of Contents