Content components content-components

When you design content for emails, landing pages, templates, and visual fragments, use the Content components to add visual design elements.

You can add as many content components as you need inside one or more structure components, which define the layout.

Contents library

The Contents section of the Components library displays the available content components:

Icon
Component
Description
Container icon
Container
Add this component to your design to include a rectangular container that you can use to group components or apply background or border styling to an area.
Button icon
Button
Add this component to your design to include a clickable button element.
Text icon
Text
Add this component to your design to include a body of text.
Divider icon
Divider
Add this component to your design to include a horizontal line to separate areas of your content.
HTML icon
HTML
Add this component to your design to copy-paste the different parts of your existing HTML. Use this component to create a free modular HTML block to reuse some external content.
Image icon
Image
Add this component to your design to insert an image file.
Social icon
Social
Add this component to your design to insert links to social media pages.
Form icon
Form
Available for landing pages only. Add this component to your design to insert a created form.

Content component toolbars

Each content component type displays a toolbar when you select it in the canvas. The available tools, which vary by the component type, provide an easy way to work with the component directly in the rendered content. The toolbar includes formatting and functional capabilities that are applicable for the component type.

Content component toolbar {width="450"}

Formatting tools

Change text style
table 0-row-3 1-row-3 html-authored
Tool Usage Components
Change text style tool {width="120px"} Apply bold, italic, underline, or strike-through, superscript, or subscript to the selected text string.
  • Button

  • Text

Horizontal alignment
table 0-row-3 1-row-3 html-authored
Tool Usage Components
Horizontal alignment tool {width="120px"} Apply a horizontal alignment type to the component content. Choose left, centered, right or justified.
  • Button

  • Text

Create list
table 0-row-3 1-row-3 html-authored
Tool Usage Components
Create list tool {width="120px"} Apply ordered or unordered list formatting to the component text.
  • Text
Set heading
table 0-row-3 1-row-3 html-authored
Tool Usage Components
Set heading tool {width="60px"} Apply heading level formatting to the paragraph for the cursor location.
  • Button

  • Text

Font size
table 0-row-3 1-row-3 html-authored
Tool Usage Components
Font size tool {width="60px"} Apply font size to a selected text. Click the tool and choose the size or enter the px value.
  • Button

  • Text

Font color
table 0-row-3 1-row-3 html-authored
Tool Usage Components
Font color tool {width="200px"} Apply font color to the selected text. Choose a color from the picker and use the color slider and the color field to select the color. Or, you can enter a known RGB, HSL, HSB, or hexadecimal value.
  • Button

  • Text

Insert link
table 0-row-3 1-row-3 html-authored
Tool Usage Components
Insert link tool {width="200px"}

Create a clickable link for the selected text or element.

  • Email content - Specify an external URL or landing page.

  • Landing page content - Specify an external link.

  • Button

  • Text

  • Image

Remove link
table 0-row-3 1-row-3 html-authored
Tool Usage Components
Remove link tool {width="80px"} Remove the clickable link for the selected text or element.
  • Button

  • Text

  • Image

Functional tools

Tool
Name
Usage
Add personalization {width="40"}
Add personalization
Use the personalization editor to insert personalization tokens in the component content. Learn more
Show the source code {width="40"}
Show the source code
Display the HTML source code for the component in a read-only popup.
Show HTML code {width="200"}
Enable conditional content {width="40"}
Enable conditional content
(Emails and fragments) Enable conditional variants for the component.
Duplicate {width="40"}
Duplicate
Create a copy of the component and add it directly below.
Delete {width="40"}
Delete
Remove the component.

Add a content component to your design

  1. In the visual design space, use an existing template or add the needed structure components into an empty canvas to define the layout.

  2. In the Components library, grab the Drag handle Drag handle for the content component of your choice, then drag and drop it onto the structure components.

    You can add several components into a single structure component and into each column of a structure component.

    Drag the content component into the structure component {width="600" modal="regular"}

  3. Adjust the component display using the Settings and Styles tabs on the right, or the context toolbar displayed in the canvas.

    For example, you can change the text style, padding, or margin of the component.

    Define the settings and styles for the content component {width="600" modal="regular"}

As you are working with your design, you can also remove or duplicate a component using the Delete and Duplicate tools in the Functional tools section.

Content component settings and styles

After you add a component, it is selected in the visual design space and its properties are displayed in the right panel. You can also select a component at any time to change the settings and styles. Many settings and styles are specific to the component, but there are some standard settings and styles that you can apply to any selected content components.

Display options

If you want to exclude the component from desktop or mobile device display, change the Display Options setting. The default, Show on all devices, enables display across all devices. Choose another setting to make the component exclusive by device type:

  • Show only on desktop devices - Choose this setting when you want to display the component on desktop devices and exclude it for mobile devices.
  • Show only on mobile devices - Choose this setting when you want to display the component on mobile devices, such as phones and tablets, and exclude it for desktop devices.

Display options for content component {width="400" modal="regular"}

Container container

Use a container to apply specific styling to a group of content components. Add a Container component and then add other content components inside it. This component is similar to how you might use a div element in HTML. You can apply a distinct style to the container that differs from the style applied to the content components that it contains.

For example, add a Container component and then add a Button component inside that container. You can use a specific area styling for the container, and style the button and its background as you need.

Container content component styles {width="600" modal="regular"}

Background
{{styles-background}}
Border
{{styles-border}}
Size
{{styles-size}}
Margin
{{styles-margin}}
Padding
{{styles-padding}}

Button button

Use the Button component to insert one or multiple clickable buttons into your content. Use buttons to redirect page viewers or email recipients to supporting content (published landing page or an external link).

Add the button text

When the button component is displayed in the canvas, the toolbar includes options for text formatting, as well as personalization and conditional variants. For more information about the editor toolbar options, see Content component toolbars.

When you enter the button label text and set the formatting, the button resizes to accommodate the content.

Button component displayed with toolbar {width="500" modal="regular"}

On the Settings tab, use the Link options to define the button text, link destination, and the browser behavior for loading the target page.

  1. Set the Type for the link:

    • External link - Choose this type to use a standard URL as the link destination.

      In Url, enter the URL for the link destination. Click the Personalize ( Personalize icon ) icon to use a personalization token as a parameter in the URL.

      Define an external link for a button component {width="200"}

    • Landing page - Choose this type to select a published landing page in the connected Marketo Engage instance.

      For the Landing Page option, select the published landing page. Click the Select page icon ( Show links icon ) and select the published landing page.

      Define a link to a landing page for a button component {width="200"}

  2. For Label, enter the text that you want to display inside the button.

    The button sizing adjusts according to the text and the styling that you set.

  3. For Target, choose how the linked destination is redirected from the email or page:

    • None - Opens the link using the default browser or client behavior (default).
    • Blank - Opens the link in a new window or tab.
    • Self - Opens the link in the same frame.
    • Parent - Opens the link in the parent frame.
    • Top - Opens the link in the full body of the window.

Set styles

Customize the button styling in the Styles tab.

Background
{{styles-background}}
Text
{{styles-text}}
Border
{{styles-border}}
Size
{{styles-size}}
Alignment
{{styles-alignment-h-v}}
Button margin
{{styles-margin}}
Container margin
{{styles-margin}}
Padding
{{styles-padding}}
Advanced
{{styles-advanced}}

Text text

Use the Text component to insert a text block into your content. When the text component is selected in the canvas, enter the text and use the toolbar options to add inline formatting and options, including personalization tokens and conditional variants.

Customize the text component styling in the Styles tab.

Background
{{styles-background}}
Text

These styles are applied to the whole text block. You can apply inline styling to a selected text string.

{{styles-text}}

Border
{{styles-border}}
Size
{{styles-size}}
Margin
{{styles-margin}}
Padding
{{styles-padding}}
Advanced
{{styles-advanced}}

Divider divider

Add a Divider component to incorporate a linear division between sections of your content.

Background
{{styles-background}}
Line

On the right panel with the Styles tab selected, expand the Line section and set the options for the component height and width:

  • Color - Click the color square to choose a color from the picker. You can choose a color by entering a known RGB, HSL, HSB, or hexadecimal value. Or, you can use the color slider and the color field to select the color.

  • Height - Click the up and down arrow icons to increase or decrease the number of pixels. An empty value (Auto) is the default and sizes the height of the element according to its contents.

  • Width - Use the toggle to set the width by pixels or percentage.

    • For a percentage width, use the slider to set the percentage value. The percentage determines the element size based on the content box of the containing block, which excludes padding and borders. For example, a value of 50 sets the element width to 50% of its containing block content width.

    Define line styling for a divider component {width="250"}

    • For a pixel-based width, click the up and down arrow icons to increase or decrease the number of pixels. An empty value (Auto) is the default and sizes the width of the element according to its contents.
  • Style - Choose a value from the list of standard CSS line-style values, such as Solid, Dotted, and Dashed.

Size
{{styles-size}}
Alignment
{{styles-alignment-h}}
Margin
{{styles-margin}}
Padding
{{styles-padding}}
Advanced
{{styles-advanced}}

HTML html

Use the HTML component to add parts of your existing HTML. This component provides an easy way to create modular HTML elements that reuse your external content.

  1. Select the component on the canvas and click the Show the source code icon in the toolbar.

    Open the code editor to add the HTML {width="450"}

  2. Paste the HTML in the text box and click Save.

    Edit HTML dialog {width="600" modal="regular"}

    If the HTML is valid, it renders the element on the canvas. If it is an element that maps to one of the other content components, you can change the settings and styles in the right panel according to the component type. If it does not, it remains as an HTML component.

For an HTML component, you can set the following styles for the whole HTML component in the right panel:

Background
{{styles-background}}
Border
{{styles-border}}
Size
{{styles-size}}
Alignment
{{styles-alignment-h-v}}
Margin
{{styles-margin}}
Padding
{{styles-padding}}
Advanced
{{styles-advanced}}

Image image

Use the Image component to insert an image asset into your content. When the Image component is selected in the canvas, you can add or change the displayed image asset file.

Image component displayed with toolbar {width="400" modal="regular"}

Add the image asset add-image-asset

Choose a method to add the image asset:

  • Select asset - Choose this type to browse and select an image asset from the Marketo Optimizer Assets library.

    Browse the available image assets {width="700" modal="regular"}

    From the dialog, you can choose an image from the selected repository. Click Select to add the asset.

    There are tools available to help you locate the asset that you need:

    • Click the Filter icon on the top left to filter the displayed items according to your criteria.

    • Enter text in the Search field to filter the displayed items for a match of the asset name.

  • Import media - Choose this type to select a file from your system and import it into the Marketo Optimizer asset library.

    In the Upload image dialog, drag and drop a file from your system to the file box. The maximum file size is 100 MB.

    Import an image file to the asset library {width="450"}

    The file names of the selected images are displayed in the dialog. Asset file names must be unique (across folders), and if a file with the name already exists, a message is displayed. Names can have a maximum of 100 characters, and cannot contain special characters (such as ;, :, \, and |).

    Click Import.

You can add an image title and alt text for the image in the right panel.

Image settings {width="250"}

On the Settings tab, use the Link options to link the image with a destination and the browser behavior for loading the target page.

  1. Set the Type for the link:

    • External link - Choose this type to use a standard URL as the link destination.

      In Url, enter the URL for the link destination. Click the Personalize ( Personalize icon ) icon to use a personalization token as a parameter in the URL.

      Define an external link for an image component {width="250"}

    • Landing page - Choose this type to select a published landing page in the connected Marketo Engage instance.

      For the Landing Page option, select the published landing page. Click the Select page icon ( Show links icon ) and select the published landing page.

      Define a link to a landing page for an image component {width="250"}

  2. For Label, optionally enter descriptive text for the image link.

  3. For Target, choose how the linked destination is redirected from the email or page:

    • None - Opens the link using the default browser or client behavior (default).
    • Blank - Opens the link in a new window or tab.
    • Self - Opens the link in the same frame.
    • Parent - Opens the link in the parent frame.
    • Top - Opens the link in the full body of the window.

Set the styles

Set the styles for the image component in the right panel.

Background
{{styles-background}}
Border
{{styles-border}}
Size
{{styles-size}}
Alignment
{{styles-alignment-h}}
Margin
{{styles-margin}}
Padding
{{styles-padding}}
Advanced
{{styles-advanced}}

Social social

Use the Social component to insert links to social media pages into your content. It includes three default social media types, but you can add or remove the types according to your needs.

New social component with default types {width="600" modal="regular"}

  • To add a social media type, click the Add ( + ) icon and choose a social media type that you want to add.

    Click + to add social media type {width="250"}

  • To remove a social media type, click the X next to the social media icon.

Expand the card for each social media type to set the options:

  • URL - Enter the social media URL that you want to link to the social media graphic or icon.
  • Source - If you want to use your own image instead of the default, choose an image asset. You can select an image from the Assets library, or import an image file from your system. Refer to the Image component information for details about selecting and importing image assets.
  • Alt text - Enter the alt text for the displayed image.

Settings for the expanded social media type {width="250"}

To define a consistent display size for all social media graphics, set the Size of images.

You can set the following style options for the Social component:

Background
{{styles-background}}
Border
{{styles-border}}
Size
{{styles-size}}
Alignment
{{styles-alignment-h}}
Margin
{{styles-margin}}
Padding
{{styles-padding}}
Advanced
{{styles-advanced}}

Form (landing pages only) form

Use the Form component to add a published form to a landing page or landing page template. For more information about creating and publishing forms, see Forms.

  1. Click the Form tool in the component toolbar, or use the Embed Form properties on the right to select the published form.

    Select the published form {width="600"}

  2. If you want to override the default Follow up type for the form, change the setting according to the requirements for your page or template.

    This page is also known as the Thank-you page for the form and this setting determines what happens when a visitor submits the form:

    • Stay on page - Choose this option to keep the visitor on the same page when the form is submitted.

    • Landing page - Choose this option to select any Marketo Optimizer or Marketo Engage landing page as the follow-up.

    • External URL - Choose this option to specify any URL as the follow-up page. After the visitor submits the form, the browser loads the designated URL.

      note tip
      TIP
      If you want to use the form for downloading a file, you can specify a URL for the hosted file. With this configuration, the submit button functions as a download button.

      Change the follow-up setting {width="280"}

If needed, select the Styles tab in the right panel to set the form margins within the structure component.

{{styles-margin}}

recommendation-more-help
marketo-optimizer-help-user-guide