---
title: "which hubl tags are deprecated in hubspot, and the fixes"
url: https://codefmt.dev/blog/hubspot-deprecated-hubl-tags
updated: 2026-08-19
sources:
  - https://codefmt.dev/blog/hubspot-deprecated-hubl-tags
licence: "© codefmt. Cite with attribution to https://codefmt.dev."
---

# which hubl tags are deprecated in hubspot, and the fixes

by [josh ozuna](/about) · codefmt

published June 11, 2026 · updated August 19, 2026

HubSpot has deprecated five HubL tags, all from the era before widgets became modules: `widget` and `custom_widget` (replaced by `module`), `widget_block` (replaced by `module_block`), `widget_attribute` (replaced by `module_attribute`), and `widget_container` (replaced by `dnd_area`). paste a template into the [codefmt HubL linter](/hubl) and the `hubl/deprecated-tag` rule flags every one, with a one-click fix that swaps in the replacement.

## every deprecated tag and its replacement

| deprecated tag    | use instead       | notes                                            |
| ----------------- | ----------------- | ------------------------------------------------ |
| widget            | module            | the original name for a standard module tag      |
| custom\_widget    | module            | custom and standard widgets unified under module |
| widget\_block     | module\_block     | block-syntax module with inline parameters       |
| widget\_attribute | module\_attribute | parameter overrides inside a module\_block       |
| widget\_container | dnd\_area         | flexible columns replaced by drag-and-drop areas |

the replacements are documented in HubSpot's own references: [standard HubL tags](https://developers.hubspot.com/docs/cms/reference/hubl/tags/standard-tags) for the module family and [drag-and-drop areas](https://developers.hubspot.com/docs/cms/reference/hubl/tags/dnd-areas) for `dnd_area`.

## why deprecated tags linger in old themes

templates that use the widget-era tags can still render, so nothing forces a migration and the legacy syntax survives copy-paste from theme to theme. the cost shows up later: new teammates learn tag names the docs no longer teach, and the markup drifts further from what HubSpot's current tooling and examples assume. since four of the five replacements are renames of the same tag shape, migrating is cheap; widget\_container to dnd\_area is the one that takes real restructuring.

## how the linter flags them

codefmt's `hubl/deprecated-tag` rule checks every tag against the deprecation catalog and reports a warning in the form `'widget' is deprecated. Use 'module' instead.` each finding ships a safe auto-fix, so the `Fix` button replaces the tag name in place without touching parameters or surrounding markup. it's one of the 7 rules with one-click safe fixes in the [rule reference](/hubl-lint-rules#deprecated-tag).

1. copy a template or module out of the design manager and paste it into the [HubL formatter and linter](/hubl).
2. each deprecated tag shows as a warning with the replacement named in the message.
3. click `Fix` to apply the renames, then copy the migrated template back into HubSpot.

## deprecation goes beyond tags

tags are the part the linter auto-fixes today, but HubSpot's deprecation docs also cover legacy filters and functions: `include_css` and `include_javascript` gave way to `require_css` and `require_js`, and blog topics became tags (`blog_topics` to `blog_tags`). while you're cleaning up a theme, sweep for those too. for everything else the 28 rules catch, from unclosed blocks to unknown filters, see the [HubSpot CMS linter](/hubspot-cms-linter) guide.

## frequently asked questions

which hubl tags are deprecated?

five legacy tags: widget (use module), custom\_widget (use module), widget\_block (use module\_block), widget\_attribute (use module\_attribute), and widget\_container (use dnd\_area). they date from before HubSpot renamed widgets to modules and introduced drag-and-drop areas.

do deprecated hubl tags still work?

templates using them can still render, which is why they linger in older themes for years. but they're legacy syntax: new development should use the module and dnd\_area equivalents. for the widget-to-module tags, migrating is a rename rather than a rewrite; widget\_container to dnd\_area is a bigger restructure.

how do i find deprecated tags in my templates?

paste the template into the codefmt HubL linter. the hubl/deprecated-tag rule flags each legacy tag as a warning, names the replacement, and ships a one-click safe fix that swaps the tag name in place.

are any hubl filters or functions deprecated too?

yes. HubSpot's deprecation docs also list legacy filters and functions, like include\_css and include\_javascript (replaced by require\_css and require\_js) and blog\_topics (replaced by blog\_tags). the dedicated deprecation page on developers.hubspot.com tracks the full list.

primary source: [HubSpot: HubL syntax reference](https://developers.hubspot.com/docs/cms/reference/hubl/overview)
