---
title: "set_attribute method"
url: "https://reference.aspose.com/finance/python-net/aspose.finance.xbrl.dom.html/htmlunknownelement/set_attribute/"
product: "Aspose.Finance for Python via .NET API References"
---


## set_attribute(name, value) {#str-str}

Adds a new attribute. If an attribute with that name is already present in the element, its value is changed to be that of the value parameter.



```python
def set_attribute(self, name, value):
    ...
```


| Parameter | Type | Description |
| :- | :- | :- |
| name | str | The attribute name. |
| value | str | The attribute value. |



### See Also
* module [aspose.finance.xbrl.dom.html](../../)
* class [HTMLUnknownElement](/finance/python-net/aspose.finance.xbrl.dom.html/htmlunknownelement)
