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.

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


About the Author

Andrew McClain has been writing since 1994. He has written several articles for various websites and writes user guides and software manuals for several freelance clients. He has a Bachelor of Arts in journalism from the University of Missouri.

More Articles