Home  ›   Blog   ›  How to Create a Popup Using HTML

How to Create a Popup Using HTML

How to Create a Popup Using HTML

As someone who has been working with HTML for a long time, I must say that if you’re good at coding, you will like working with it.

I have built tons of applications and websites using HTML, and the possibilities it offers are remarkable. Recently, I stumbled upon the idea of using popups to enhance my website’s performance. Popups have the potential to help grow your email list and improve click-through rates (CTR).

But the question is – Does HTML allow building popups?

Yes, it does. In fact, there are two ways to create a popup: using HTML itself or utilizing a popup tool like Picreel and embedding it using its own HTML code.

Here is what my Picreel popup looks like that I embedded using a simple HTML code:

In this blog post, we will explore the differences between HTML popup builder and a standardized popup tool called Picreel.

But before we delve into the methods, let’s compare HTML’s own popup builder and Picreel as a dedicated popup tool based on the following criteria:

Criteria Brevo Popup Picreel Popup
Customization ✅ HTML popups offer limited options for customization. ✅ Picreel provides a user-friendly interface for creating popups with advanced customization options like layout, colors, fonts, and styles of the popups.
Analytics ❌ HTML popups do not have built-in analytics tracking capabilities. ✅ Picreel provides robust analytics and tracking features that allow users to track and analyze the performance of their popups.
Targeting ❌ HTML popups do not have the ability to target specific users based on their behavior or actions. ✅ Picreel offers dynamic targeting options, allowing users to display popups based on user behavior, such as exit intent, scroll percentage, time spent on site, or mouse movement.
Exit-Intent ❌ HTML popups lack exit intent technology ✅ Picreel incorporates exit intent technology, triggering popups when a visitor is about to exit the site.
A/B Testing ❌ HTML popups do not include built-in A/B testing capabilities. ✅ Picreel allows users to create multiple variations of their popups and run A/B tests to compare their performance.

Based on the comparison table above, here are the top three reasons why I recommend using Picreel over HTML’s own popup builder:

  1. No-code builder: Unlike HTML that necessitates a significant coding background, Picreel streamlines the creation of popups by offering a code-free, drag-and-drop interface. This allows for easy customization without the need for any coding knowledge or experience.
  2. Extensive Customization Options: With Picreel, you have the freedom to customize every aspect of your popup. From designing the layout and selecting attractive templates to customizing colors and fonts, Picreel empowers you to create visually appealing popups that match your brand identity perfectly.
  3. Wide Platform Compatibility: Picreel seamlessly integrates with a variety of website platforms, allowing you to use it across multiple websites without any hassle. Whether you’re using WordPress, Shopify, or custom-built websites, Picreel ensures smooth compatibility across platforms.

Now, let’s explore how to create a popup using both methods in simple steps.

Method 1: Using HTML

HTML does provide you with the ability to build popups. Here’s how you can create a popup using it:

1. Open a new HTML file in your text editor.

2. In the <head> section of the HTML file, include the CSS styling for the popup box.

section of the HTML

3. In the <body> section of the HTML file, create a button or an element that will trigger the popup box. You can use the <button> tag for this. For example:

button

4. Below the button, add a <div> container with an ‘id’ attribute that will be used to display the popup box. For example:

div

5. Still in the <body> section, add a JavaScript code block to handle the popup functionality. Inside this code block, you can use JavaScript to listen for the button click event and display the popup box when the button is clicked.

body section

6. Save your HTML file and open it in a web browser. When you click the “Click me!” button, a popup box should appear with the text “This is a popup box.” You can close the popup box by clicking the close button (‘x’).

Method 2: Using Picreel Popup Builder

Picreel is a comprehensive popup tool that works across multiple platforms. Watch this video tutorial on how you can create a popup using Picreel:

Here are step-by-step instructions on creating a html popup using Picreel:

1. Sign up for a Picreel account and log in.

Sign up for a Picreel account and log in.

2. Go to the “Campaigns” menu and click “New Campaign” from the top right. Also, you can select the templates option from the drop-down or start from scratch.

New Campaign

3. From the templates menu, choose the type of popup you want to create.

templates menus

4. Once you select the design, customize it according to your preferences.

customize design

5. Configure your targeting and trigger options to specify when and where you want your popup to appear.

configure

6. Click “Save” to activate your popup.

Embedding Picreel HTML Code

To embed a Picreel popup on your websites and campaigns, follow these simple steps:

1. Navigate to campaigns and click on “View Code.

View Code

2. Click on the code to copy it.

3. Go to your target website and paste the Picreel tracking code snippet immediately before the closing </head> tag in your HTML file.

Which Is a Better Method: Method 1 or 2?

In conclusion, the choice between Method 1 (using HTML popups) and Method 2 (using Picreel) depends on your specific requirements, priorities, and coding experience.

From a long-term perspective, Picreel offers several advantages, such as platform independence, advanced popup options, and more triggers. Also, Picreel comes with a forever-free plan for startups and small businesses and allows you to create unlimited popups with all premium features. I feel the free version does the job, however, you can always look for paid options that start as low as $9.99/month.

Ultimately, consider your needs, coding knowledge, and the level of sophistication you desire for your popups before making a decision. Happy popup creation!

Do you want instant 300% growth?

Picreel popups can get YOUR website 300% instant sales growth. See Case Studies.

About the author

Daniel Nicholes shares insights about CRO, persuasive marketing, exit-intent strategies, and using nudges to capture consumer behavior insights with the goal of enhancing user experience. Daniel writes about CRO methods, including landing page optimization, site intercept surveys, popups, and how to optimize the complete customer journey. Daniel actively contributes to industry discussions, offering actionable & practical advice for experience optimization.