Custom HTML, CSS, and JS injection

Site Designer is a visual tool, but sometimes you need to insert raw code at a specific point on the page. There are four injection points, each suited to different needs.

Per-element HTML injection

Every element on the canvas has underlying HTML attributes and structure. You can edit these directly.

  1. Select an element on the canvas.
  2. Open the Content pane (the middle tab in the right panel).
  3. Click the HTML tab.
  4. Edit the raw HTML for that element — add custom attributes, data-* attributes, ARIA attributes, or tweak the tag directly.

This is useful for adding aria-label, data-tracking-id, or any attribute not exposed through the visual controls.

The HTML Code element

The HTML Code element is a special canvas element that renders a raw block of arbitrary HTML. Use it to embed third-party widgets, iframes, map embeds, or anything that requires markup you write yourself.

  1. Open the Elements panel in the toolbar.
  2. Find the HTML Code element (look under the “Code” or “Embed” category).
  3. Drag it onto the canvas at the position you want.
  4. Double-click the element to open the code editor.
  5. Paste or type your HTML. The canvas renders a preview (for embeds, the canvas may show a placeholder — the real output appears in the browser).

Common uses for the HTML Code element:

  • Embedding a Google Map or Apple Map iframe.
  • Adding a third-party form (Typeform, Jotform, HubSpot).
  • Inserting a video player embed (YouTube, Vimeo, Wistia).
  • Placing a social media feed widget.
  • Adding a cookie consent banner provided by a third-party script.

Inline CSS injection

For CSS rules that do not map to any control in the Style pane, add them directly to the element’s inline styles.

  1. Select the element.
  2. Open the Style pane.
  3. Scroll to the Custom CSS field at the bottom of the pane.
  4. Type valid CSS property-value pairs. These are written as element-level inline styles in the exported HTML.

Use this sparingly — element-level inline styles are hard to maintain and override globally. When possible, define a class and style through the class system.

Page-level code injection

Add code to a single page’s <head> or </body> footer via Page Properties.

  • Page Head — CSS, meta tags, or scripts specific to this page.
  • Page Footer — JavaScript that should load after the page content, scoped to this page only.

See the Global head and footer code article for the full execution order.

Global Code

For code that must appear on every page, use Settings → Project → Global Code. See the Global head and footer code article.

Choosing the right injection method

What you needUse
Custom attribute on one elementPer-element HTML injection (Content pane)
Third-party embed at a specific canvas positionHTML Code element
CSS rule not in the Style paneCustom CSS field in Style pane
Script or style for one pagePage Properties → Code tab
Script or style for every pageSettings → Global Code