Designers can build website, landing page and blog templates from scratch using HTML. Marketing Hub Professional and Enterprise accounts are able to build custom coded email templates as well. It's also possible to clone a HubSpot template layout to HTML, and customize it as a coded template.
This article includes information on 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 is not responsive by default. Work with a professional designer to make sure your template is responsive for different screen sizes.
Create a new HTML & HUBL file
In your HubSpot account, navigate to Marketing > Files and Templates > Design Tools.
In the left sidebar, create a new file by clickingFile>New file. You may need to click thefolder folder icon to expand the finder.
In the dialog box, click theWhat would you like to build today?dropdown menu and select HTML & HUBL.
Enter the details of your new file:
SelectTemplateorTemplate Partial. A template partial is a template that can be used within other templates.
In the dropdown menu, select the type of template you're coding (page, blog, or email).
Give your file a name.
To update the file's location, in theFile locationsection, clickChangeand select the folder to add the file to.
Write the HTML for your page or email template.
To preview how your HubL will render, click to toggle the Show output switch on. A panel will open on the right with the rendered preview.
In the upper right, click Preview to preview how your template will appear and function in the content editor. This preview syncs with the editor and will automatically refresh as you work.
In the upper right, click Publish changes
Any errors in your code will be flagged in an error message when you try to publish changes. The error console at the bottom of the code editor will display the error or warning details, as well as suggestions on how you can fix these errors and warnings.