# Styling modules in templets (HubL)

**URL:** <https://community.hubspot.com/t/styling-modules-in-templets-hubl/48561>\
**Category:** CMS Development\
**Tags:** html\
**Created:** [December 15, 2021, 5:01am UTC](https://community.hubspot.com/t/styling-modules-in-templets-hubl/48561 "2021-12-15T05:01:15Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![marth](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/marth/32/7115_2.png) [@marth](https://community.hubspot.com/u/marth)\
**Post date:** [December 15, 2021, 5:01am UTC](https://community.hubspot.com/t/styling-modules-in-templets-hubl/48561/1 "2021-12-15T05:01:15Z")

</div>

I read that all the default hubspot modules have [style fields.](https://developers.hubspot.com/docs/cms/building-blocks/module-theme-fields-overview)  
Now I have a image module on my Hubl template that looks like this.

```lia-code-sample
{% dnd_module path="@hubspot/linked_image",
 img={
 "alt": "Stock placeholder image with grayscale geometrical mountain landscape",
 "loading": "lazy",
 "max_height": 451,
 "max_width": 605,
 "size_type": "auto_custom_max",
 "src": get_asset_url("../images/grayscale-mountain.png")
 },
 styles={
 "alignment" : {
 "alignment" : {
 "horizontal_align" : "CENTER"
 }
 }
 }
%}

```

It seems that the alignment option is not working. What is the correct syntax for the styles fields?

---

<div class="post-metadata">

**Author:** ![system](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/system/32/124_2.png) [@system](https://community.hubspot.com/u/system)\
**Post date:** [December 15, 2021, 1:41pm UTC](https://community.hubspot.com/t/styling-modules-in-templets-hubl/48561/2 "2021-12-15T13:41:21Z")

</div>

Hi @marth ,  
Use styling like this  
{% dnd\_module path=‘@hubspot/linked\_image’,label=“Banner Image”, horizontal\_alignment=“CENTER”  
for more detail refer this article:-

> **[Drag and Drop Areas HubL Tags - HubSpot docs](https://developers.hubspot.com/docs/cms/reference/hubl/tags/dnd-areas)**
>
> The HubL tags used to build drag and drop areas that allow developers to create sections of pages that support layout, stylistic and content changes directly within the content editors.

Hope this helps!

If we were able to answer your query, kindly help the community by marking it as a solution.  
Thanks and Regards.

---

<div class="post-metadata">

**Author:** ![marth](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/marth/32/7115_2.png) [@marth](https://community.hubspot.com/u/marth)\
**Post date:** [December 16, 2021, 1:53am UTC](https://community.hubspot.com/t/styling-modules-in-templets-hubl/48561/3 "2021-12-16T01:53:36Z")

</div>

Hi [@webdew](https://community.hubspot.com/t5/user/viewprofilepage/user-id/131510),  
That worked. Thanks
