Custom HTML Attributes – Sections & Columns

Share This Post

🎯 Purpose

Allows you to insert custom HTML attributes (like data-*, ARIA roles, rel, or any other valid attribute) into the wrapper elements of sections, columns, or widgets. This enhances functionality, accessibility, and integration with external tools.


âś… Step-by-Step Instructions

  1. Open Elementor

    • Right-click the section, column, or widget handle and choose “Edit” to open its settings.

  2. Navigate to Advanced Settings

    • Inside the panel, go to the Advanced tab and locate the Attributes field.

  3. Add Your Custom Attributes

    • Enter attributes using the format:

       
      key|value
    • Example: role|presentation adds role="presentation".

  4. Multiple Attributes

    • Add each attribute on a separate line.

    • For multiple values on one attribute, separate with spaces:

       
      data-spots|round long

      This results in data-spots="round long".

  5. Save

    • After setting your attributes, update the widget and view source HTML to confirm they appear correctly in the markup.


đź’ˇ Common Use Cases

  • ARIA Roles: Improve accessibility (e.g., role="navigation").

  • Data Attributes: Set up interaction hooks for JavaScript (e.g., data-id="123").

  • SEO/Link Attributes: Add rel="nofollow" or similar.

  • Custom Hooks: Add IDs or classes for deeper styling or behavior control.


⚠️ Notes & Tips

  • These attributes are applied to the wrapper element, not inner content.

  • Only available in the Advanced > Attributes area—no code editing needed.

  • Unsupported attributes (like onclick) are blocked for security safeguards.


🔎 Summary Table

FeatureDescription
Where to AddAdvanced → Attributes panel of section, column, or widget
FormatEach attribute as `key
Multiple valuesSpace-separated values under the same key
Generated HTML output<section data-spots="round long" role="presentation">...
UsesAccessibility, tracking, SEO, interaction control
SecurityPrevents dangerous attributes (like inline JS)

This feature empowers you to extend Elementor’s output with semantic markup, interactive data hooks, or SEO optimizations—all within the visual editor.

Subscribe To Our Newsletter

Get updates and learn from the best

More To Explore

Do You Want To Boost Your Business?

drop us a line and keep in touch

Learn how we helped 100 top brands gain success.

Let's have a chat

Have a Question? Ask us anything.

The right website makes everything else easier — sales, trust, growth.