close html function