# Element.editAttributes

## Parameters

* **element:** HTML element to edit the attributes of
* **attributes:** attributes to change

## Returns

the ClearlyHTML element

## More about the editAttributes function

{% content-ref url="../editattributes" %}
[editattributes](https://negevvo.gitbook.io/clearlyjs/clearlyjsref/html-elements/editattributes)
{% endcontent-ref %}

## Examples

{% tabs %}
{% tab title="JavaScript" %}

```javascript
var a = clrly.new("h1", {}, "hello"); // Create a new element with clrly.new
a.editAttributes({innerHTML: "a text", style: "color: red"}); // Change the text to "a text" and the text's color to red
```

{% endtab %}

{% tab title="JSX" %}

```jsx
var a = <h1>hello</h1>; // Create a new element with clrly.new
a.editAttributes({innerHTML: "a text", style: "color: red"}); // Change the text to "a text" and the text's color to red
```

{% endtab %}
{% endtabs %}
