Close Its Own Tab
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Close Tab Example</title>
<script>
function closeTab() {
window.close();
}
</script>
</head>
<body>
<h1>Close Tab Example</h1>
<p>Click the button below to close this tab.</p>
<button onclick="closeTab()">Close Tab</button>
</body>
</html>