// Open a new blank window
const newWindow = window.open('about:blank', '_blank');
// Inject HTML content into the new window
if (newWindow) {
newWindow.document.write(`
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>About Blank Example</title>
<style>
body {
font-family: Arial, sans-serif;
text-align: center;
margin-top: 50px;
}
</style>
</head>
<body>
<h1>Welcome to About:Blank</h1>
<p>This content was dynamically added using JavaScript!</p>
</body>
</html>
`);
newWindow.document.close(); // Ensure the document is fully loaded
}
⬆️Script above. You have to put the link after the document.write. DO NOT DELETE THE (' also after you put the link you have to put ')