Use of Dialog Tag in HTML | HTML Dialog Tag

HTML DIALOG <dialog> Tag


The <dialog> tag is used to construct a dialog box and window including a popup or modal window on a web page.

Note: This tag is not compatible with Internet Explorer.


<!DOCTYPE html>
    <title> Dialog With JavaScript </title>
     dialog {
       width: 50%;

      <dialog id="DialogboxExample">
          This is a dialog window.
        <button id="hide">Close dialog text</button>
      <button id="show">Show dialog text</button>
	<p><b>Note:</b> The dialog tag is not supported in Internet Explorer.</p>
    <script type="text/JavaScript">
      (function() {
         var dialog = document.getElementById('DialogboxExample');
         document.getElementById('show').onclick = function() {;
         document.getElementById('hide').onclick = function() { dialog.close();



Best WordPress Hosting


Discount Coupons

Get a .COM for just $6.98

Secure Domain for a Mini Price

Leave a Reply

    Waiting for your comments