DEV Community

Cover image for HTML tags | dialog
Carlos Espada
Carlos Espada

Posted on • Edited on

3 1

HTML tags | dialog

It is used to represent a dialog box or other interactive component, such as a dismissible alert, inspector or subwindow.

It has an attribute open to indicate that the dialog is active and can be interacted with. When the open attribute is not set, the dialog shouldn't be shown to the user.

The tabindex attribute must not be used on the <dialog> element.

<form> elements can close a dialog if they have the attribute method="dialog". When such a form is submitted, the dialog closes with its returnValue property set to the value of the button that was used to submit the form.

The ::backdrop CSS pseudo-element can be used to style behind a <dialog> element when the dialog is displayed with HTMLDialogElement.showModal(). For example, to dim unreachable content behind the modal dialog.

There is a way to create a dialog from scratch and make them accessible.

  • Type: block
  • Self-closing: No
  • Semantic value: No

Definition and example | Support

Image of Timescale

🚀 pgai Vectorizer: SQLAlchemy and LiteLLM Make Vector Search Simple

We built pgai Vectorizer to simplify embedding management for AI applications—without needing a separate database or complex infrastructure. Since launch, developers have created over 3,000 vectorizers on Timescale Cloud, with many more self-hosted.

Read more →

Top comments (0)

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more