Articles → HTML 5 → Dialog Tag In Html5

Dialog Tag In Html5






Purpose





Syntax


<dialog open>Text</dialog>





Example


<!DOCTYPE html>
<html lang="en" xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta charset="utf-8" />
    <title></title>
  </head>
  <body>
    <dialog open style="background-color: red;">This is an open dialog window</dialog>
  </body>
</html>

Try It


Output


Picture showing the output of dialog tag in HTML5
Click to Enlarge


Browser Support


Internet ExplorerFirefoxChromeSafariOperaEdge
79.053.037.0Not Supported24.079.0





Posted By  -  Karan Gupta
 
Posted On  -  Saturday, April 9, 2022

Query/Feedback


Your Email Id  
 
Subject 
 
Query/FeedbackCharacters remaining 250