# Javascript: ComponentSettings.containerElement Property

> Optional. The container DIV element. Alternative to containerID. If both are specified, containerElement takes precedence.

- **Product:** DS Server
- **Section:** Reference
- **Kind:** Property
- **Introduced:** 32.0
- **Path:** DS Server > Reference > JavaScript API > Javascript: ComponentSettings.containerElement Property
- **196 words**
- **Web URL:** https://docs.textcontrol.com/ds-server/reference/javascript/componentsettings/containerelement-property/
- **LLMs URL:** https://docs.textcontrol.com/ds-server/reference/javascript/componentsettings/containerelement-property/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/ds-server/reference/javascript/componentsettings/containerelement-property/llms-full.txt

---

### Description

Optional. The container DIV element. Alternative to containerID. If both are specified, containerElement takes precedence.

### Syntax

```javascript
<HTMLDivElement> ComponentSettings.containerElement
```

### Examples

The following example demonstrates `ComponentSettings.containerElement` in a practical document-editing workflow. Optional. The container DIV element. Alternative to containerID. If both are specified, containerElement takes precedence.

```javascript
function inspectContainerElement(componentSettings) {
    const containerElement = componentSettings.containerElement;
    console.log("container element:", containerElement);
}
```

---

## Nearby

- **Previous:** [ComponentSettings Object](https://docs.textcontrol.com/ds-server/reference/javascript/componentsettings/llms-full.txt)
- **Next:** [Javascript: ComponentSettings.containerID Property](https://docs.textcontrol.com/ds-server/reference/javascript/componentsettings/containerid-property/llms-full.txt)
