Quackit Logo

Got a MySpace Page?

Get "www.yourname.com" for your MySpace page. Learn how >>.

HTML Close Window Code

Print Version

You can use the following HTML code to close window within your website. This can be handy on popup windows. To be precise, this is actually JavaScript code combined with HTML code.

<a href="JavaScript:window.close()">Close</a>

To see this code in action, check out the "close" link on this popup page:

Open a popup window (then close it using the "close" link)

Enjoy this website?

  1. Link to this page (copy/paste into your own website or blog):
  2. Add this page to your favorite social bookmarks sites:
                     
  3. Add this page to your Favorites

Oh, and thank you for supporting Quackit!