HTML Popup Window Code

Here's how to create a popup window in HTML. You can use the following HTML code to create a popup window within your website or blog. Simply copy, paste, and change the values to suit.

Example HTML Popup Window Code:

View Output

This example actually uses JavaScript code for the popup window. You can also open a new window using HTML code without JavaScript (although using the HTML method, you aren't able to specify how the window will look). To open a new window using HTML, see HTML Open New Window.

Automatically Center Your Popup

The following page has code for automatically centering your popup in the middle of the users' window, as well as other little snippets of code.

If you need to automatically center the popup on the screen, check it out.