# How to defer linked CSS

**URL:** <https://community.hubspot.com/t/how-to-defer-linked-css/60325>\
**Category:** CMS Development\
**Created:** [July 5, 2022, 6:22am UTC](https://community.hubspot.com/t/how-to-defer-linked-css/60325 "2022-07-05T06:22:20Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![ashu125](https://avatars.discourse-cdn.com/v4/letter/a/ac91a4/32.png) [@ashu125](https://community.hubspot.com/u/ashu125)\
**Post date:** [July 5, 2022, 6:22am UTC](https://community.hubspot.com/t/how-to-defer-linked-css/60325/1 "2022-07-05T06:22:20Z")

</div>

Hi there, can someone please tell me how to defer a CSS file that’s linked to a Template.

---

<div class="post-metadata">

**Author:** ![KSchuller](https://avatars.discourse-cdn.com/v4/letter/k/f19dbf/32.png) [@KSchuller](https://community.hubspot.com/u/KSchuller)\
**Post date:** [July 5, 2022, 10:13am UTC](https://community.hubspot.com/t/how-to-defer-linked-css/60325/2 "2022-07-05T10:13:23Z")

</div>

Refer to this [HubL functions - HubSpot docs](https://developers.hubspot.com/docs/cms/hubl/functions#require-css) you will see there you can async a CSS file in the following way:

`{{ require_css(get_asset_url("./style.css"), { async: true }) }}`

---

<div class="post-metadata">

**Author:** ![ashu125](https://avatars.discourse-cdn.com/v4/letter/a/ac91a4/32.png) [@ashu125](https://community.hubspot.com/u/ashu125)\
**Post date:** [July 6, 2022, 5:55am UTC](https://community.hubspot.com/t/how-to-defer-linked-css/60325/3 "2022-07-06T05:55:23Z")

</div>

But the problem is that I am not requiring the css file, I am injecting the css to a template

 ![img_20220710_456897.png](https://d2qpr2jzcazej7.cloudfront.net/original/2X/f/f2c3a9217c7c158fdb3825d6ea22b0e5a8ed35df.png)

---

<div class="post-metadata">

**Author:** ![KSchuller](https://avatars.discourse-cdn.com/v4/letter/k/f19dbf/32.png) [@KSchuller](https://community.hubspot.com/u/KSchuller)\
**Post date:** [July 6, 2022, 8:58am UTC](https://community.hubspot.com/t/how-to-defer-linked-css/60325/4 "2022-07-06T08:58:51Z")

</div>

@ashu125 you can simply unlink the css file there and then include it in the markup.

If you want more control over linked files you will need to HubSpot CLI and edit the module’s meta.json file and use **css\_render\_options** -- you can find more details here [Coding Custom Modules - HubSpot docs](https://developers.hubspot.com/docs/cms/building-blocks/modules/files)

---

<div class="post-metadata">

**Author:** ![ashu125](https://avatars.discourse-cdn.com/v4/letter/a/ac91a4/32.png) [@ashu125](https://community.hubspot.com/u/ashu125)\
**Post date:** [July 6, 2022, 10:48am UTC](https://community.hubspot.com/t/how-to-defer-linked-css/60325/5 "2022-07-06T10:48:12Z")

</div>

Yeah, I can do that. Thanks a lot
