Get your own website Result Size: 625 x 565
x
 
<!DOCTYPE html>
<html>
<body>
<h1>HTML Objects</h1>
<h2>The Dialog Object</h2>
<p>Click the button to open a dialog window.</p>
<button onclick="myFunction()">Try it</button>
<dialog id="myDialog">This is an open dialog window</dialog>
<script>
function myFunction() {
  const element = document.getElementById("myDialog");
  element.open = true;
}
</script>
</body>
</html>