Clear Styles in Your Campaign

This feature requires Author user level or higher.

Content you paste into your campaigns from an outside source, like a website or word processor, can apply extra HTML code that alters your campaign layout or restricts your ability to make changes.

The Clear Styles button in MailChimp’s editor toolbar helps remove extra style code from your content after it’s pasted into your campaign. Open the source code for a text block to remove additional code the Clear Styles tool didn’t remove.

Below, you’ll learn more about the Clear Styles tool and how to delete extra HTML code from your campaign that Clear Styles can’t remove.

How Clear Styles Works

The Clear Styles button removes style code from your campaign’s HTML code, like bold, italics, and text color. While you may want these styles applied to your text, the styles you paste in from websites and word-processors often display incorrectly in email clients.

Clear Styles is designed to remove only style code, and is limited in its ability to remove code that isn’t exclusive to styles, like <p> and <div> tags. This code needs to be removed manually from the source code of your text blocks.

Use the Clear Styles Tool

As best practice, we recommend you type content directly into your campaign, and apply styles in the Campaign Builder. MailChimp’s editor is designed to create HTML content that works with most email clients.

However, if you’ve created content outside of your account, and have already added content to your campaign, use Clear Styles to remove extra HTML code. You’ll then need to apply styles to your text again in the Campaign Builder.

Below, you’ll learn how to use Clear Styles to remove extra code.

  1. Navigate to the Design step of the Campaign Builder.
  2. Click to edit the content block you want to work with.
    Cursor clicks the edit icon in the content block.
  3. Highlight the text in the content block, and click Clear Styles.
    Text content block with highlighted text, and cursor clicks Clear Styles in toolbar.
  4. Click Save & Close.

If your layout looks good, add new styles to your text with MailChimp’s editing tools. It’s important to follow our suggested style hierarchy when you apply styles to your text, so the style settings in one area don’t override the styles in another section.

If you still notice problems with your campaign layout, take a look at the source code to identify any additional code that the Clear Styles tool was unable to remove.

Remove Extra Code

You can still delete any additional HTML code that Clear Styles isn’t able to remove. This code can be accessed in the source code of the text block, but isn’t visible in the visual designer.

Below, you’ll learn how to view the source code for your campaign.

  1. Navigate to the Design step of the Campaign Builder.
  2. Click to edit the content block you want to work with.
    Cursor clicks the edit icon in the content block.
  3. Click the < > Source icon.
    Text content block with cursor clicking the source icon.
    Identify extra code and delete it. Tags contain an opening and closing tag, so if you delete a <p> tag, also find and delete the </p> tag. Below is an example with the highlighted HTML code you should delete.
    Text content block in source code view, with highlighted examples of the code that should be deleted or replaced.
    Common Tags to Delete
    <p>
    </p>
    <div>
    </div>

    Common Characters to Replace
    &nbsp; replace with a space
    &rsquo; replace with an apostrophe (')
    &rdquo; replace with an apostrophe (')
    &quot; replace with quotation marks (")
  4. Click Save & Close.

After the extra HTML code is removed, you can add styles to your text with MailChimp’s styling tools. It’s important to follow our suggested style hierarchy when you apply styles to your text, so the style settings in one area don’t override the styles in another section.

Was this article helpful?
What can we do to improve articles like this?

Technical Support