# Adding Class and ID attributes to Custom Sections

**URL:** <https://community.hubspot.com/t/adding-class-and-id-attributes-to-custom-sections/119692>\
**Category:** CMS Development\
**Created:** [November 1, 2024, 9:57pm UTC](https://community.hubspot.com/t/adding-class-and-id-attributes-to-custom-sections/119692 "2024-11-01T21:57:48Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![JLarry5001](https://avatars.discourse-cdn.com/v4/letter/j/45deac/32.png) [@JLarry5001](https://community.hubspot.com/u/JLarry5001)\
**Post date:** [November 1, 2024, 9:57pm UTC](https://community.hubspot.com/t/adding-class-and-id-attributes-to-custom-sections/119692/1 "2024-11-01T21:57:48Z")

</div>

Newbie having trouble here.  
My overall problem is that Class and ID attributes are not available on most elements in HS. (Insert rant here)  
My solution is to create a new section that has class and id attributes available to the user to edit. I have done this with custom modules but I’m having trouble with sections. Has anyone else had trouble doing this?

---

<div class="post-metadata">

**Author:** ![GiantFocal](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/giantfocal/32/41969_2.png) [@GiantFocal](https://community.hubspot.com/u/GiantFocal)\
**Post date:** [November 4, 2024, 12:42am UTC](https://community.hubspot.com/t/adding-class-and-id-attributes-to-custom-sections/119692/2 "2024-11-04T00:42:29Z")

</div>

Hi @JLarry5001,

Sections don’t support IDs/classes. Two workarounds you can try:

1. Develop section-as-module with custom ID and class fields.
2. Develop a “Settings” module that appends custom ID and class values to the section it’s added into.

We use approach #2 in all of our HubSpot themes.

---

<div class="post-metadata">

**Author:** ![JLarry5001](https://avatars.discourse-cdn.com/v4/letter/j/45deac/32.png) [@JLarry5001](https://community.hubspot.com/u/JLarry5001)\
**Post date:** [November 5, 2024, 10:23pm UTC](https://community.hubspot.com/t/adding-class-and-id-attributes-to-custom-sections/119692/3 "2024-11-05T22:23:33Z")

</div>

Thanks @GiantFocal!

If you have a moment, could you elaborate on Option 2? I’m just getting started with HubL and am not familiar with how to append class and ID to a parent.

I appreciate it.
