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

# Set Tag

> Set the value of the specified HTML tag of the DOMElement.

## `element.setTag(tag)`

Set the value of the specified [HTML tag](https://developer.mozilla.org/en-US/docs/Web/HTML/Element) of the DOMElement.

This method also works on other Webflow elements; see [Set HTML tag](/designer/reference/set-tag).

## Syntax

```typescript
element.setTag(tag: string): Promise<null>
```

## Parameters

* tag : `string` - The [HTML tag](https://developer.mozilla.org/en-US/docs/Web/HTML/Element) to set for the element

## Returns

**Promise\<`null`>**

A promise that resolves to `null`

## Example

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

if (selectedElement?.children) {

  // Create and append DOM Element
  const DOMElement = await selectedElement.append(webflow.elementPresets.DOM);
  console.log(DOMElement)

  // Set Tag
  await DOMElement?.setTag('img');
  const tag = await DOMElement.getTag()
  }
```

## Designer Ability

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

```
```