1and1 Help Centre Categories

print article

Add Scripts or Custom HTML to a 1&1 MyWebsite Page

Learn how to integrate custom HTML code and scripts into your 1&1 MyWebsite.

There are two possible places where to include custom HTML or scripts such as JavaScript in a 1&1 MyWebsite package:

  • Within the <head> tag or header
  • In one of the 1&1 MyWebsite pages directly

The <head> tag is normally used to define JavaScript functions for use in multiple pages or JavaScript that should be run on every page load.

It is also possible to add your own custom HTML or JavaScript within a page directly if only one page requires a script or custom HTML.

Adding HTML to the Header
Step 2
Click on the Settings icon from the main menu .
1&1 MyWebsite editor > Settings
1&1 MyWebsite editor > Settings
Step 3
Choose the Edit Header Section icon.
Settings overview page
Settings overview page
Step 4
Enter the HTML necessary for the <head> tag and then click on Save. Edit Header Section
Edit Header Section

A message should be displayed that the code has been saved. Confirmation message

Confirmation message

Adding HTML to a Page
Step 2
Click the Insert Elements icon from the main menu.
1&1 MyWebsite editor > Insert Elements
1&1 MyWebsite editor > Insert Elements
Step 3
Click and hold the Widget/HTML icon from the Basics category.
Insert Elements > Basics > Widget / HTML
Insert Elements > Basics > Widget / HTML


Drag the icon over to the page where you want the HTML code to appear. When it is positioned correctly, release the mouse. 1&1 MyWebsite page
1&1 MyWebsite page
Step 4
Enter your HTML or script into the text box and then click Save to proceed.
Widget / HTML window
Widget / HTML window
Step 5
You will receive a message that states The widget is only displayed in the page view, not in the editing mode. Message appearing on the 1&1 MyWebsite page
Message appearing on the 1&1 MyWebsite page
Step 6
Scroll to the bottom of the page. Click Page view to test the functionality of the Widget/HTML.
1&1 MyWebsite editor > Page view
1&1 MyWebsite editor > Page view
Step 7
You will now see the Widget / HTML on your page and can make sure it is functioning properly.
1&1 MyWebsite showing the new Widget / HTML
1&1 MyWebsite showing the new Widget / HTML

To return to the editing mode, scroll down again and click on Edit page.
For additional information, you may want to reference: