# How to add CSS to Form?

**URL:** <https://community.hubspot.com/t/how-to-add-css-to-form/8880>\
**Category:** CMS Development\
**Created:** [May 17, 2018, 4:38am UTC](https://community.hubspot.com/t/how-to-add-css-to-form/8880 "2018-05-17T04:38:25Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![aniek\_2](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/aniek_2/32/31184_2.png) [@aniek\_2](https://community.hubspot.com/u/aniek_2)\
**Post date:** [May 17, 2018, 1:05pm UTC](https://community.hubspot.com/t/how-to-add-css-to-form/8880/3 "2018-05-17T13:05:50Z")

</div>

Indeed go to the form \> actions \> embed code and add the lines from the example as well if they are not there:

```auto
<!--[if lte IE 8]>
<script charset="utf-8" type="text/javascript" src="//js.hsforms.net/forms/v2-legacy.js"></script>
<![endif]-->
<script charset="utf-8" type="text/javascript" src="//js.hsforms.net/forms/v2.js"></script>
<script>
 hbspt.forms.create({
	portalId: "#",
	formId: "#",
 submitButtonClass: '#',
 css: ' ',
 cssClass: '#',
});
</script>

```

Portal and form Id are already filled in.

SubmitButtonClass: add the class of the button

css: ‘’ makes sure that the default css is disabled

cssClass: add 1 class (2 won’t work is my experience, but if you succeed please let me know).

---

_[View the full topic](https://community.hubspot.com/t/how-to-add-css-to-form/8880)._
