43. What is the dialog element?
<dialog> represents a dialog box or subwindow. JavaScript can use show() for non-modal display and showModal() for modal display. A form using method="dialog" can close the dialog.
Key Takeaways
- dialog provides native dialog semantics.
- showModal() creates modal dialog behavior.
Knowledge Check
Which method opens a modal dialog?