Special attributes for links in <iframe> elements

When you display a page in your site using an iframe, you need to add specific code — target="_blank" — to your links for them to work relatively to your site, and not relatively to the embeded page. The code should look like the following:

<a href="http://url-of-the-link.com" target="_blank">Text of the link</a>

Achieve this in Webflow using Custom Attributes

This kind of attribute can be added to elments in Webflow. For example, let's set a buton.

A Webflow button is a link

A Webflow button is nothing less than an HTML link element <a> with a class named w-button. For instance, the real HTML code of the button above is:

<a data-w-id="2bb73ab2-e8f9-b584-cda4-41b598a1c0b9" class="w-button" href="#">A Webflow button is a link</a>

Let's select the button and open the Settings tab. At the end of the Settings tab, there's a Custom Attribute zone. 

Click on + and add "target" for the name and "_blank" for the value.

The code of the button is now what we wanted:

<a data-w-id="2bb73ab2-e8f9-b584-cda4-41b598a1c0b9" class="w-button" target="_blank" href="#">A Webflow button is a link</a>