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

# Get Tag

> Retrieve the HTML tag of the element.

## `element.getTag()`

Retrieve the [HTML tag](https://developer.mozilla.org/en-US/docs/Web/HTML/Element) of the element.

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

## Syntax

```typescript
element.getTag(): Promise<null | string>
```

## Returns

* **Promise\<*String*>** : If the element has a tag, a promise that resolves to the tag value.
* **Promise\<`null`>**: If the element does not have a tag, a promise that resolves to `null`

## Example

```typescript
// Get All Elements and find first DOM Element
const elements = await webflow.getAllElements()
const DOMElement = elements.find(element => element.type === "DOM")

if (DOMElement?.type === "DOM") {

  // Get DOM Element's Tag
  const tag = await DOMElement.getTag()
  console.log(tag)

} else {
  console.log('No DOM Element Found')
}
```

## Designer Ability

Checks for authorization only

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

```
```