Skip to main content Accessibility Feedback

Attributes & Properties

Element.removeAttribute()

Remove an attribute (including data attributes) on an element.

let elem = document.querySelector('#lunch');
elem.removeAttribute('data-chips');