> 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 Heading Level

> Set the heading level of a heading element.

## `element.setHeadingLevel(level)`

Set the heading level of a heading element.

You can also use [`element.setTag()`](/designer/reference/set-tag) to change the heading level of a heading element.

## Syntax

```typescript
element.setHeadingLevel(level: 1 | 2 | 3 | 4 | 5 | 6): Promise<null>
```

## Parameters

* `level`: *Number* - 1 | 2 | 3 | 4 | 5 | 6

## Returns

**Promise\<`null`>**

A Promise that resolves to `null`

## Example

```typescript
const selectedElement = await webflow.getSelectedElement()

if (selectedElement?.type === 'Heading'){

  const headingLevel = await selectedElement.setHeadingLevel(1)
  console.log(headingLevel)

} else {
  console.log("Selected Element is not a Heading Element")
}
```

## Designer Ability

| Designer Ability | Locale | Branch | Workflow | Sitemode |
| :--------------- | :----- | :----- | :------- | :------- |
| **canEdit**      | Any    | Any    | Canvas   | Any      |

```
```