How to close a browser window with HTML code?

Use the below code example.

<input type="button" value="Close this window"   onclick="self.close()">