How to Create a Pop Up Window (Automatic)

By Andrew McClain

When creating a web page, you may want to create a message that gets readers' attention. One way to do this is with a pop-up window. If used too often, pop-ups can quickly become annoying. However, when applied with restraint, pop-ups are a useful tool for getting your message across. Just remember not to hide the pop-up behind an open browser window. One nice thing about pop-ups is that you do not need to know a lot of coding to create one: just some simple HTML code and Javascript.

Step 1

Create an HTML file in Notepad or other text editor.

Step 2

Paste the following code between the and tags:

Step 3

Replace the attributes with any that you choose. For example, you can replace "backgroundColor" with a different color. You can also replace the border with a more narrow line or a different color.

Step 4

Save the file with an .htm extension.

Step 5

Open the file in Internet Explorer to test the pop-up.