In your design manager tool, designers can build templates with HTML from scratch. For Marketing Hub Professional and Enterprise accounts, this includes custom coded email templates. It's also possible to clone a HubSpot template layout to HTML, and customize it as a coded template.
This article includes how to create and troubleshoot custom coded templates, as well as what HubL is required in your templates. If you aren't comfortable working with code, use one of the ready-made templates in your HubSpot account or check out the template marketplace to purchase pre-made templates.
Please note: a custom coded template won't be responsive by default. Work with a professional designer to make sure your template is responsive for different screen sizes.
For additional resources on custom design, you can refer to HubSpot designer documentation. There is additional documentation on coded module options such as filter tags and icons.
When you're done, click Publish changes to publish the template or HTML file.
Once you have your structural HTML written, you'll see an error message if your code is missing any required HubL tags if you were to try to publish your the file. HubL tags connect your code to HubSpot's settings and content editor. Learn about the required template variables and HubL module tags.
For email templates, include the required email and CAN-SPAM tokens. Check out the HubL documentation to learn more about CAN-SPAM tokens.
The required CAN-SPAM tokens can be included in two ways:
1. Include one token that pulls in the unsubscribe CAN-SPAM section: . When this token is used, you won't have the ability to format the language and style of the text and links. Here is an example of what the would look like:You then need to add the following tokens individually:
23 1st St.
Cambridge
MA
02141
Using the tokens individually will allow you the flexibility to add wording around the tokens and links and to format them in the desired style and language.
An alternative to coding from scratch is cloning one of HubSpot's templates to HTML. Cloning a template to HTML gives you access to a template's HTML/HubL and is a great way to reverse engineer a HubSpot template that you have constructed.
To create a coded version of an existing template: