element.removeAttribute(name) is the correct method to remove an attribute from an element. It completely removes the attribute from the element, rather than just setting it to null or empty string. This is important for boolean attributes like 'disabled' or 'checked', where the presence of the attribute matters more than its value. The method works with both standard HTML attributes and custom data attributes.