Add HTML code to your website thanks to the Widget block

January 19, 2023 - Yasmina Souidi
44767 views

1 minute

The HTML gadget is part of the Widget block, the general presentation of this block is available in the Widget block guide.

The HTML widget block allows you to embed HTML code from third party services, into your website. In this case, it simply consists in copying (CTRL-C keys) and pasting (CTRL-V keys) a piece of code provided by a third party service.

Manage the HTML Widget block

How to create a website wikihow

Your code

Enter or paste here the HTML code you want to embed into your website page.

Direct embedding option

By default, the code is not directly embedded. Basically, it means that the code is in an HTML iframe. However, the iframe is not generated, if the code contains Javascript. For an HTML code, this option has no effect.
Logically, if the code itself contains an <iframe> tag, the direct embedding option should be enabled, because it is useless to have an iframe within an iframe.
Depending on the cases, it may happen that a code containing Javascript requires direct embedding. Then you have to switch the button to on.

Disable HTML validation

By default, The HTML widget block controls the HTML code and eliminates the erroneous or problematic parts of it. Thus it is recommended to leave the HTML activation enabled, except if the third party service provider performs verifications on the embed code.

HTML Widget and SSL

This code uses an insecure resource (http:// url in a src attribute) which is not compatible with SSL. Please only use https:// URL for resources if you want to enable https site feature.

If this warning message appears in the HTML widget window, it means that your HTML code refers to resources with an http:// address (non-secure protocol), whereas you configured your website in https:// (secure protocol).

Create your blog

To be secure, a website should only use secure resources. If you use the HTML Widget block to embed third party services into your (secure) website, check that the service provider is compatible with https. Today, it should be systematically the case.

Example: add a weather widget with Accuweather

Many web services offer HTML widgets to embed into blogs and websites. It is the case for instance of Accuweather.
The first step consists in configuring the widget of your choice.

How to create website using php

And the second step provides the code to embed.

Website builder free hosting

You then just have to copy and paste it into your HTML Widget block.

Create free
Create php website 

 

 

Yasmina Souidi
Content Manager Junior
My passion for the Web urged me to SEO and content creation. Curious and meticulous, I work as a Content Manager Junior at SiteW. 🌱

Last update: January 19, 2023