# Adding HTML classes in posts doesn't appear to work

**URL:** <https://meta.discourse.org/t/adding-html-classes-in-posts-doesnt-appear-to-work/62275>\
**Category:** Support\
**Created:** [May 8, 2017, 3:46am UTC](https://meta.discourse.org/t/adding-html-classes-in-posts-doesnt-appear-to-work/62275 "2017-05-08T03:46:36Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![jomaxro](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jomaxro/32/126216_2.png) [@jomaxro](https://meta.discourse.org/u/jomaxro)\
**Post date:** [May 8, 2017, 3:54am UTC](https://meta.discourse.org/t/adding-html-classes-in-posts-doesnt-appear-to-work/62275/2 "2017-05-08T03:54:53Z")

</div>

> [@boisy](#):
>
> Is discourse stripping the class attributes?

Yes it is. Most HTML in a post is sanitized for security reasons - you wouldn’t want arbitrary scripts to be executed.

You’ll need to whitelist the classes you wish to use. I’d suggest a close reading of this topic, it should help you out:  
[https://meta.discourse.org/t/whitelisting-some-html-tags/24280?u=jomaxro](https://meta.discourse.org/t/whitelisting-some-html-tags/24280)

---

_[View the full topic](https://meta.discourse.org/t/adding-html-classes-in-posts-doesnt-appear-to-work/62275)._
