COS-General

What is a stylesheet?

Last updated: September 9, 2016

Available For:

Product: HubSpot Marketing
Subscription: Basic, Professional, & Enterprise

A stylesheet is a collection of rules that dictate how specific elements of your website will be displayed across the web. These rules, or style declarations, are stored in a file(s) that has a .css (cascading stylesheet) extension. This style sheet is then attached to your website pages through a <link> tag in your <head> section that points to the style sheet’s virtual location.

In HubSpot, you can create a new stylesheet to manage your website’s look and feel from within the Design Manager.

To create a new style sheet from scratch:

  • Navigate to Content Design Manager
  • Click the Coded Files folder and click the blue New coded file button.

  • Choose Code Editor and Page, then click Create.
  • Choose a folder to save the stylesheet in and give the file a name that ends with .css (e.g. mystylesheet.css).
  • Click Save.
  • Add any CSS rules you’d like to apply to elements on your website in the editor.
  • Click Publish Changes then click Update

When you click Update, the HubSpot code editor compiles all the included CSS into a single minified style sheet (a compressed CSS file with no extra spaces) that can be applied to your entire website, a template, or a single page. For more information about attaching stylesheets to your pages, check out this article.

To learn more about working with stylesheets in HubSpot, check out the Design Manager User Guide