# Adding classes to paragraphs for styling

**URL:** https://meta.discourse.org/t/adding-classes-to-paragraphs-for-styling/151590
**Category:** Support
**Created:** [May 15, 2020, 10:10am UTC](https://meta.discourse.org/t/adding-classes-to-paragraphs-for-styling/151590 "2020-05-15T10:10:30Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![bekircem](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/bekircem/32/44582_2.png) [@bekircem](https://meta.discourse.org/u/bekircem)
#### Post date: [May 15, 2020, 10:10am UTC](https://meta.discourse.org/t/adding-classes-to-paragraphs-for-styling/151590/1 "2020-05-15T10:10:30Z")

</div>

Hi,

I am trying to create some custom paragraph styles with CSS.

```
p.custom-class {
  font-size: 30px;
  line-height: 40px;
  direction: rtl;
}

```

But when I call that class in Discourse editor it is not working:  
`<p class="custom-class">TEXT</p>`

I will create multiple paragraph style. I need a solution for this. Any solution?

Thanks.

Edit: It seems div[data-theme-\*] is working but not working for p element.

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [May 15, 2020, 12:42pm UTC](https://meta.discourse.org/t/adding-classes-to-paragraphs-for-styling/151590/2 "2020-05-15T12:42:22Z")

</div>

Maybe see [Generic bbcode wrapper for theme components](https://meta.discourse.org/t/generic-bbcode-wrapper-for-theme-components/123516)
