- Knowledge Base
- Content
- Design Manager
- Create, edit, and attach CSS files
Create, edit, and attach CSS files
Last updated: September 22, 2026
Available with any of the following subscriptions, except where noted:
-
Additional subscriptions required for certain features
Cascading stylesheets (CSS) control the visual presentation of your site's pages by selecting and styling page elements. Use the design manager to create new CSS files, edit existing ones, and attach them to templates, specific pages, or entire domains.
For simple design changes to a specific page, learn more about editing page content in the content editor. If you're using a theme template, learn more about editing your theme settings.
Create a new CSS file
Permissions required Design tools permission is required to create CSS files in the design manager.
- In your HubSpot account, click More, then navigate to Content > Design Manager. If More doesn't appear in your account, navigate to Content > Design Manager directly.
- In the finder, click File > New file on the upper left.
- In the dialog box, click the dropdown menu and select CSS + HubL.
- Click Next.
- Enter a name for your file in the File name field.
- To change the location of the file, click Change. In the pop up box, select a new file location.
- When finished, click Create.
Edit a CSS file
Once you have created or opened an existing CSS file, make your edits in the code editor. In addition to standard CSS, the code editor supports HubL variables and macros to make maintaining your CSS easier.
Permissions required Design tools permission is required to edit CSS files in the design manager.
To see a list of standard CSS selectors for HubSpot templates, check out Boilerplate CSS.
- { local.navDesignManager }}
- In the finder, click File > New file or open an existing CSS file.
- In the code editor, enter or update the CSS to make your edits.
To preview how your HubL will render, click the Show output switch on at the top of the editor. A panel will open on the right with the rendered preview.
Check for errors
Before publishing, check your code for HubL errors. Errors appear in the console at the bottom, the error gutter on the left, and the scroll bar on the right of the code editor.
Errors preventing you from publishing will be in red, while general warnings will be in yellow. At the bottom of the code editor, click Show details to see more information on the errors in the error console and Hide details to collapse the error console.

Publish a CSS file
After editing your CSS file, click Publish changes in the upper right. To call this stylesheet in another coded template, click the Actions dropdown menu in the finder and select Copy public URL.
Attach stylesheets to assets
Attach stylesheets to your templates, individual pages, or to an entire domain. Stylesheets are applied in a specific order based on where they're attached. The list below reflects the order in which they are applied on your site:
- public_common.css (required): a stylesheet primarily used by HubSpot's app, but also for certain site features.
- Header HTML: link tags added to the global
<head>of your site in Content > Page settings. - Layout.css (required for drag-and-drop layouts): default responsive CSS file attached to all drag-and-drop template layouts.
- Attached stylesheets (Pages): stylesheets attached to your entire site in Content > Page settings.
- Attached stylesheets (Blog): stylesheets attached to your blog (overrides site global sheets) in Content > Blog settings.
- Linked stylesheets (recommended for template layouts): stylesheets attached in the template layout.
- Additional <head> markup in the template: link tags added to the
<head>of a particular template layout. - Page-specific stylesheets: stylesheets attached in a page's settings.
- Page head HTML: link tags added to the
<head>of a particular page in the page's settings.
Attach stylesheets to templates
Stylesheets can be attached to drag and drop templates in the inspector within the design manager. For coded templates, stylesheets are added directly in the code editor.
Permissions required Design tools permission is required to attach stylesheets to templates.
Drag and drop templates
- In your HubSpot account, click More, then navigate to Content > Design Manager. If More doesn't appear in your account, navigate to Content > Design Manager directly.
- In the finder, click the name of your drag and drop template file.
- In the inspector, click the Add dropdown menu in the Linked stylesheets section and select your stylesheet. To remove a stylesheet, click X.
- When finished, click Publish changes in the upper right to apply your changes to the live pages using the template.
Coded templates
For coded templates, stylesheets are attached directly in the code editor using <link> tags or the HubL tag in the <head> of the file. Learn more about coded templates in the developer documentation.
Attach stylesheets to a specific page
Subscription required Marketing Hub Professional or Enterprise is required to attach stylesheets to a specific page.
Permissions required Edit permission is required to attach stylesheets to a specific page.
Please note: this option isn't available for theme templates. Learn how to edit your theme settings.
To attach a page-specific stylesheet from the settings section of the content editor:
-
Navigate to your content:
- Website Pages: In your HubSpot account, click More, then navigate to Content > Website Pages. If More doesn't appear in your account, navigate to Content > Website Pages directly.
- Landing Pages: In your HubSpot account, click More, then navigate to Content > Landing Pages. If More doesn't appear in your account, navigate to Content > Landing Pages directly.
- Click the name of your page.
- In the content editor, click the Settings menu and select Advanced.
- In the dialog box, in the Stylesheets section, click the Attach a stylesheet dropdown menu and select a stylesheet. To remove a stylesheet, click X next to the stylesheet.
- To turn off stylesheets that are inherited from the template or domain, click the dropdown menu next to the stylesheet and select Disabled.

Attach domain stylesheets
Subscription required Marketing Hub Professional or Enterprise is required to attach stylesheets to a domain.
Permissions required Website settings permission is required to attach stylesheets to a domain.
Please note: theme templates must include the annotation enableDomainStylesheets: true in order to use domain-level stylesheets. Learn more about template annotations.
To attach a stylesheet to an entire domain:
- In your HubSpot account, click the
settings icon in the top navigation bar. - In the sidebar menu, click Content > Pages.
- Click the dropdown menu to select the domain you want to update the settings for.
- On the Templates tab, in the CSS & Stylesheets section, click + Add style sheet. To remove a stylesheet, click the X next to the attached stylesheet.
- Click Save.

Please note: when downgrading to HubSpot’s Starter or free tools, attached domain-level stylesheets will remain active until you remove them. Once all stylesheets are removed, you can no longer attach stylesheets at the domain-level. Learn more about downgrading a subscription.

