# How do you insert two style elements in the p tag

**URL:** <https://forum.freecodecamp.org/t/how-do-you-insert-two-style-elements-in-the-p-tag/135465>\
**Category:** General\
**Created:** [July 11, 2017, 5:13pm UTC](https://forum.freecodecamp.org/t/how-do-you-insert-two-style-elements-in-the-p-tag/135465 "2017-07-11T17:13:59Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![nim](https://avatars.discourse-cdn.com/v4/letter/n/67e7ee/32.png) [@nim](https://forum.freecodecamp.org/u/nim)\
**Post date:** [July 11, 2017, 5:13pm UTC](https://forum.freecodecamp.org/t/how-do-you-insert-two-style-elements-in-the-p-tag/135465/1 "2017-07-11T17:13:59Z")

</div>

this is my code for having two font sizes

```auto
<style>
  .red-text {
    color: red;
  }
  .font-size {
    font-size: 16px;
  }
</style>

<h2 class="red-text">CatPhotoApp</h2>

<p class="font-size">Kitty ipsum dolor sit amet, shed everywhere shed everywhere stretching attack your ankles chase the red dot, hairball run catnip eat the grass sniff.</p>

<p>Purr jump eat the grass rip the couch scratched sunbathe, shed everywhere rip the couch sleep in the sink fluffy fur catnip scratched.</p>

```

with this code i get two font sizes and that works; but i am unable to make the first p element red. if i just do it as was done in the previous exercise then i have two p elements for the " Kitty ipsum dolor sit amet, shed…one for the font and one for the red text the out put is two paras one in font and the other in color  
so, how to proceed?  
thank you every body

---

<div class="post-metadata">

**Author:** ![Vipern](https://avatars.discourse-cdn.com/v4/letter/v/0ea827/32.png) [@Vipern](https://forum.freecodecamp.org/u/Vipern)\
**Post date:** [July 11, 2017, 10:37pm UTC](https://forum.freecodecamp.org/t/how-do-you-insert-two-style-elements-in-the-p-tag/135465/2 "2017-07-11T22:37:49Z")

</div>

Just change the class of your p elements like this:

First one should be like this  
p class=“red-text”\>…\</p  
Second p should be  
p class=“font-size”\>…\</p

---

<div class="post-metadata">

**Author:** ![DaveC](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/davec/32/161518_2.png) [@DaveC](https://forum.freecodecamp.org/u/DaveC)\
**Post date:** [July 12, 2017, 7:10am UTC](https://forum.freecodecamp.org/t/how-do-you-insert-two-style-elements-in-the-p-tag/135465/3 "2017-07-12T07:10:17Z")

</div>

> [@nim](#):
>
> i am unable to make the first p element red.

You can use as many classes as you want. Just separate them by a space.

```auto
<p class="font-size red-text">...</p>

```

---

<div class="post-metadata">

**Author:** ![ILM](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/ilm/32/363239_2.png) [@ILM](https://forum.freecodecamp.org/u/ILM)\
**Post date:** [January 17, 2021, 8:48pm UTC](https://forum.freecodecamp.org/t/how-do-you-insert-two-style-elements-in-the-p-tag/135465/4 "2021-01-17T20:48:18Z")

</div>

Closed on January 17, 2021, 8:48pm UTC


