# add\_class

Source: https://zotonic.com/docs/1524/add_class

URI: https://zotonic.com/id/1524

Language: en



Add a css class to an html element.

Example:

```django
{% button action={add_class target="myid" class="newclass"} %}
```

Adds the CSS class “newclass” to the element with HTML id “myid”.

License: 

Attribution: 

Related resources: https://zotonic.com/api/agent/related/1524?language=en


## API access

- [API help](<https://zotonic.com/api-help>)
- [OpenAPI specification](<https://zotonic.com/openapi.json>)
- [This resource as JSON](<https://zotonic.com/api/agent/resource/1524?language=en>)
