---
title: "which hubl tags are deprecated in hubspot, and the fixes"
url: https://codefmt.dev/blog/hubspot-deprecated-hubl-tags
updated: 2026-10-26
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 October 26, 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 for the four that are renames.

## 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.` `widget` to `module` ships a safe auto-fix, so the `Fix` button replaces the tag name in place without touching parameters or surrounding markup. the `widget_block` family gets an unsafe fix under `Fix (unsafe)`, closing tag included, because `module_block` also wants `module "name" path="..."`, which you fill in yourself. `widget_container` is flagged with no fix, because moving to `dnd_area` is a restructure. 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` (or `Fix (unsafe)` for the block tags) 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 fix that swaps the tag name in place, closing tag included. widget to module is a safe fix; the widget\_block family is offered as an unsafe one, since module\_block also needs a module path. widget\_container gets the warning without a fix, since moving to dnd\_area changes the layout, not just the name.

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)

## for agents (added to every page twin, not part of the page)

- format API: POST https://codefmt.dev/api/format (OpenAPI: https://codefmt.dev/api/openapi.json, code up to 51,200 characters, 50KB of ASCII (400 above it), request body up to 100KB, counted in bytes (413 above it), no authentication)
- MCP server: POST https://codefmt.dev/api/mcp (tools: format_code, format_json, ask_codefmt; manifest: https://codefmt.dev/.well-known/mcp.json)
- rate limit: 60 requests per minute per ip across format api calls, mcp and a2a tool calls, and /ask (mcp handshakes and listings are not counted). the count is kept per server instance, so treat it as a ceiling to stay under rather than an exact budget. the format api reports where you stand in RateLimit headers and its 429 carries Retry-After; /ask answers a 429 with the message in answer, and an mcp tool call over the limit returns a tool result saying to try again in a minute
- auth statement: https://codefmt.dev/auth.md (no accounts, api keys or oauth; send no authorization header)
- site index for agents: https://codefmt.dev/llms.txt
- full reference (request bodies for every language, a copy-paste curl command, platform globals, troubleshooting): https://codefmt.dev/llms-full.txt
