An element to mimic a dialog box

dialog

The dialog element provides a way for content to be selectively shown or hidden.

The visibility of the dialog's content is determined by the presence or absence of the open property.

Unlike the summary element — which toggles the visibility of the details element — the only way to make the dialog element visible is by using JavaScript to add or remove the open property.

Properties

open
When this property is added to the element, the dialog is visible.
When this property is omitted from the element, the dialog is hidden.

Example

dialog *open {
form *method=dialog {
label Which computer language do you want to learn next?
select {
JavaScript
CSS
HTML
BLUE-PHRASE
}
button *type=submit Vote now!
}
}
An interactive dialog with an embedded form

semantax > scripting > dialogAn element to mimic a dialog box

Q