Simple Popup Window using HTML and CSS
In this tutorial, you will learn how to create a popup window using HTML CSS only. A pop-up window is a common web element that is used by many websites.
The HTML popup window is used primarily to display e-mail subscription forms, login forms, or any other advertisements.
Earlier I created an automatic popup window using JavaScript. However, this design is not automatic. This popup needs to be opened manually. Only HTML and CSS are used here. There are many beginners who want to create popup boxes without JavaScript, this design is for them.
I have shown many types of elements using popup boxes before. It is a basic structure that is completely empty. You can add elements according to your needs in that space.
How to Create Popup Window using HTML CSS
HTML checkbox has been used to execute the HTML popup box. A small button has been created on the webpage. This popup box will be completely hidden under normal conditions. The window will be visible when you click on the button.
This popup window HTML contains a small cancel button. When you click on that button, the window disappears again.
See the Pen Untitled by Shantanu Jana (@shantanu-jana) on CodePen.
Below I have given all the source codes to make it and show you how to use these codes. Although there is a button at the bottom of the article that allows you to download all the code to create this simple popup window.
Popup Window HTML Code
The code below is the HTML code that added all the information to this project. Copy these codes and add them to your HTML file. This is where a popup button was first created. A box is then created and a cross mark is used in this box.
Design Popup Window by CSS
Now it's time to design this popup box with CSS. Copy the following code and add it to your CSS file. You can add all these codes to the HTML file if you want. To do this, you must rename your CSS file using style.css.
Hopefully, you can create a simple HTML CSS popup window above. If you have trouble copying the code, you can use the download button below.
In the meantime, I have shown many types of elements such as a popup login form, and a popup email subscribes form.
Comments
Post a Comment
Tell me what you think ??😎