close button html w3schools code example Example: html close window button <button type="button" onclick="javascript:window.close()"> Name </button>