Why do we have the codes for the body tag, header tag and footer tag and still have the embed code?

Hello everyone. I’m new to Webflow. I’m a bit lost, so if anyone can help me, that would be great. I see that we can use the code in several places in our design. I want to understand what these dfferences are for please.

Hi Lory,

  • Site wide code is included on every page of your site
  • Page-specific code in included only on that page
  • Collection-page template code is included on every collection page generated for that collection

In all of these, both the before-head and before-body code will only run in the published site.

  • HTML embeds are basically the same, but allow you to position code within your element hierarchy. This allows for some more creative placement, where that might matter.

Often, HTML embeds are for embedding HTML, like a chunk of HTML given to you for a video embed, or a booking widget embed.

One key feature of embeds is that if they contain only a <style></style> element with CSS content, that style will be applied in the designer itself, which can be very useful when you want to use CSS styling that the designer does not directly expose in the style pane.