Webflow + Custom Code

Using Custom Code

Overview
Do You Remember?
Tracking w/ Cookies & Web Storage
100
Using Custom Code
100
Custom Code Character Limit
101
Custom Code
HTML Encoding & Decoding
102
Inline Coding Techniques
4:41
104
Inline CSS
4:41
104
Webflow.js
Webflow.js
150
Sygnal Webflow Utilities ( WFU )
Sygnal Webflow Utils ( WFU )
200
Helper Functions
202
No items found.
Published
June 29, 2025
in lightbox

Best Practices

Each of the tools Webflow provides are useful, but they are best used in different ways, depending what you are trying to achieve.

Here's a guide based on the type of custom code you're working with;

Inline SVGs

Inline SVGs are handled slightly differently by the web browser, in that they support currentColor.

  • Use Embeds, where possible
For larger SVGs that cannot fit in an Embed, you'll need to store these in assets as files, and reference through an Image element. This loses the currentColor benefit, so you'll need to pre-color them.

JSON-LD

Used for technical SEO purposes to describe key aspects of your content.

  • Use the before-body custom code area for page-level JSON-LD
  • Use Embeds for Collection list item-level JSON-LD, such as FAQs
  • Consider Microdata or RDFa instead for larger more complex rich data needs, since it's integrated directly into HTML

JavaScript

To do all the cool stuff;

  • Use the before-body custom code area for page-level JavaScript
  • Use the before-body site-side custom code area for site-wide JavaScript
  • Use Embeds when you have specially-designed JavaScript that follows an element-referencing pattern. Sygnal uses this pattern when we want to integrate simple code directly in reusable components.

Mixed / widget code

For drop in widgets like calendly booking or Jotforms, you can use widgets to place them specially, and/or head/body code.

Read the instructions carefully to decide how to best integrate them.

Table of Contents
Comments
Did we just make your life better?
Passion drives our long hours and late nights supporting the Webflow community. Click the button to show your love.