> This page is for Designer API.

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://developers.webflow.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://developers.webflow.com/_mcp/server.

# Remove Attribute

> Remove the specified HTML attribute from the DOMElement.

## `element.removeAttribute(name)`

Remove the specified [HTML attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes) from the DOMElement. Use this method instead of the 'Custom Attribute' methods.

## Syntax

```typescript
element.removeAttribute(name: string): Promise<null>
```

## Parameters

* name : `string` - The name of the attribute to remove

## Returns

**Promise\<`null`>**

A promise that resolves to `null`

## Example

```typescript
// Get Selected Element
const selectedElement = await webflow.getSelectedElement();

if (selectedElement?.type === "DOM") {
  // Get current attributes
  const beforeAttributes = await selectedElement.getAllAttributes();
  console.log('Before removal:', beforeAttributes);

  // Remove an attribute
  await selectedElement.removeAttribute('width');

  // Get attributes after removal to verify
  const afterAttributes = await selectedElement.getAllAttributes();
  console.log('After removal:', afterAttributes);
}
```

## Designer Ability

| Designer Ability | Locale  | Branch | Workflow | Sitemode |
| :--------------- | :------ | :----- | :------- | :------- |
| **canDesign**    | Primary | Main   | Canvas   | Design   |

```
```