WEB STRUCTURE

WEB STRUCTURE

New

Element Hierarchy

Element Hierarchy

New

3:57

Navigator Panel

Navigator Panel

New

2:45

Structure Elements

Structure Elements

New

Section

Section

New

4:14

Container

Container

New

2:44

Columns

Columns

New

2:22

Div Block

Div Block

New

3:37

Buttons & Links

Buttons & Links

New

Button

Button

New

14:08

Link Block

Link Block

New

9:35

Text Link

Text Link

New

1:16

Typography

Typography

New

Heading

Heading

New

2:02

Paragraph

Paragraph

New

4:42

Rich Text

Rich Text

New

3:52

Text Block

Text Block

New

0:56

Block Quote

Block Quote

New

0:42

List

List

New

2:31

Media

Media

New

Image

Image

New

3:39

Image File Types

Image File Types

New

2:22

Image Resolution

Image Resolution

New

3:28

Assets Panel

Assets Panel

New

3:08

Video

Video

New

1:20

Background Video

Background Video

New

3:15

Lightbox

Lightbox

New

3:44

Forms

Forms

New

Intro to Forms

Intro to Forms

New

4:55

Styling Forms

Styling Forms

New

2:55

Navbar

Navbar

New

Navbar

Navbar

New

9:38

Styling a Navbar

Styling a Navbar

New

4:34

Navbar Menu Button

Navbar Menu Button

New

4:51

Dropdown

Dropdown

New

4:38

Pre-built Components

Pre-built Components

New

Slider

Slider

New

4:56

Tabs

Tabs

New

4:38

Map

Map

New

2:58

Social Media Buttons

Social Media Buttons

New

2:49

Custom Code Embed

Custom Code Embed

New

1:24

Symbols

Symbols

New

3:47

new course
CSS grid landing page tutorial (36min)

Lesson info

Lesson info

If you're on one of Webflow's premium plans, or have already set up Webflow Hosting for your site, you can use the embed element to bring all the power of code to your project. You can add custom blocks of HTML code to your sites to unlock all kinds of custom functionality.

In this video, we'll cover the basics of embeds, including:

  1. ‍Adding an embed to your site
  2. ‍Editing your code embed
  3. ‍Previewing your code embed

Explore this project

Want to dig into the project featured in this video and see how everything is put together? We've included the full project we used when making this lesson, and we've shared the link right under this very paragraph.

View and clone this projectDownload lesson assets
Clone this projectDownload project assets

Transcript

The Embed element lets us integrate code right into our project.

And to demonstrate this, we'll use a custom form embed from Typeform, but this process is similar for most third-party embeds: they'll usually provide code that looks something like this. Or this. Or even this.

We simply right click to copy the embeddable code to our clipboard, and over in our project, we can access our Embed element, located under Components in our Elements Panel. And we'll place this in a container to constrict its width, but you can put the element wherever you choose.

For now, we're immediately shown the code editor.

We'll go to paste in the custom code we copied to our clipboard. Now the code might not have any breaks in it. In other words: it's all on one line. So if you're concerned that the whole thing didn't paste in, you can scroll horizontally.

Let's press Save & Close.

We'll see a placeholder in our project. As we will any time there's a <script> embed that's pasted into the code editor. There are also embeds that use <iframe>, and those can usually preview right on the Canvas.

And once we publish or export our site, it'll show up right where we placed it.

If your third-party code doesn't explicitly set sizing (or dimensions) the content can often take up the full width of its parent element. As we covered earlier, this Typeform embed is as wide as the container we placed it in.

That's a third-party embed. At any time, we can double-click the embed element to open the code editor, and of course, you can also use the same element for your own custom code. A custom embed lets you place it in a specific location on the page.