The HTML <dialog> element provides a native way to create modal and non-modal dialog boxes, with built-in accessibility features and backdrop handling.
Modal dialogs block interaction with the rest of the page:
Non-modal dialogs allow interaction with the page:
A custom confirm dialog that returns user choice:
Dialog with form that uses method="dialog":
Different styled dialogs for various purposes:
Multiple dialogs can be stacked: