The HTML 5 <dialog> element is used to define a dialog box or a window. It may be used with form elements as well, specifying them with the attribute method="dialog". When such a form is submitted, the dialog is closed with a return value attribute set to the value of the submit button used.
Syntax:
<dialog></dialog>
Attributes:
- open; If set to open, it will make the dialog box opened by default
- global attributes
- event attributes
Example
The dialog box in HTML5 example:
Comments
No comments have been made yet.
Please login to leave a comment. Login now