> 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 HTML tag

## `element.setTag(tag)`

Set the HTML tag of an element.

For example, you can change a Webflow list element to use the `<ul>` or `<ol>` HTML tags.
The valid tag values depend on the element type.
Webflow List, Div Block, and Heading elements are supported.

### Syntax

```typescript
element.setTag(tag: BlockElementTag | HeadingTag | ListTag): Promise<null>
```

You can also use this method to set the CMS binding of a Heading element:

```typescript
// Heading elements only — binds the tag to a CMS field
element.setTag(binding: BindingInput): Promise<null>
```

### Parameters

The valid values for `tag` depend on the element type:

| Element type                                                                                                                               | Parameter type    | Valid tag values                                                                             |
| :----------------------------------------------------------------------------------------------------------------------------------------- | :---------------- | :------------------------------------------------------------------------------------------- |
| `Block`, `Section`, `VFlex`, `HFlex`, `Container`, `Row`, `Column`, `BlockContainer`, `RichText`, `Slot`, `NavbarContainer`, `TabsContent` | `BlockElementTag` | `div`, `header`, `footer`, `nav`, `main`, `section`, `article`, `aside`, `address`, `figure` |
| `Heading`                                                                                                                                  | `HeadingTag`      | `h1`, `h2`, `h3`, `h4`, `h5`, `h6`                                                           |
| `List`                                                                                                                                     | `ListTag`         | `ul`, `ol`                                                                                   |

### Returns

*Promise\<`null`>*

A Promise that resolves when the tag has changed.

### Example

```typescript
const el = await webflow.getSelectedElement();

// Change a Section element to use a nav tag
if (el?.type === 'Section') {
  await el.setTag('nav');
}

// Change a Heading element from h1 to h2 and change its CMS binding
if (el?.type === 'Heading') {
  await el.setTag('h2');
  // Bind to a CMS field
  await el.setTag({
    sourceType: 'cms',
    collectionId: 'col_abc',
    fieldId: 'field_xyz',
  });
}

// Change a List element from unordered to ordered
if (el?.type === 'List') {
  await el.setTag('ol');
}
```

### Designer Ability

Checks for authorization only

| Designer Ability    | Locale | Branch | Workflow | Sitemode |
| :------------------ | :----- | :----- | :------- | :------- |
| **canAccessCanvas** | Any    | Any    | Any      | Any      |