Quackit Logo
HTML
CSS
Scripting
Database
Hosting
Design
XML
Website builder

HTML Close Window Code

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 page?

  1. Add this page to your Favorites
  2. Link to this page (copy/paste into your own website or blog):
  3. Link to Quackit using one of these banner ads.

Thanks for supporting Quackit!