<dialog> tag in HTML
The <dialog> tag is used to create a dialog box.
The <dialog> element is used to represent the part of the web page, which is used to interact with the user to give a message or to get a reply.
open attribute in <dialog> tag
The open attribute is declared in a <dialog> tag to indicate that the element should be visible.
<dialog> tag with HTML <form> tag
In HTML <form> tag, method="dialog" value is used to automatically close the form when the submit button is pressed, but the <form> tag must be inside the <dialog> tag.
showModal() method is used to show the dialog box.
close() method is used to close the dialog box.