
## insert_rule {#str-int}

Used to insert a new rule into the style sheet. The new rule now becomes part of the cascade.


### Returns 


The inserted index


```python
def insert_rule(self, rule, index):
    ...
```


| Parameter | Type | Description |
| :- | :- | :- |
| rule | str | The style rule. |
| index | int | The rule index. |



### See Also
* module [`aspose.html.dom.css`](../../)
* class [`ICSSStyleSheet`](/html/python-net/aspose.html.dom.css/icssstylesheet)
