## Element.SetAttributeNode method

Adds a new attribute node. If an attribute with that name (nodeName) is already present in the element, it is replaced by the new one.

```csharp
public Attr SetAttributeNode(Attr newAttr)
```

| Parameter | Type | Description |
| --- | --- | --- |
| newAttr | Attr | The new attr. |

### Return Value

Returns attribute

### See Also

* class [Attr](../../attr/)
* class [Element](../)
* namespace [Aspose.Html.Dom](../../../aspose.html.dom/)
* assembly [Aspose.HTML](../../../)
