Code has been added to clipboard!

HTML dialog Tag

Reading time 1 min
Published Jul 19, 2017
Updated Oct 2, 2019

HTML dialog Tag: Main Tips

  • Introduced in HTML5, dialog tag specifies an interactive dialog box.
  • You must use both opening and closing dialog tags.
  • This tag supports global attributes.

Using dialog Tags

HTML dialog tags create pop-up dialog boxes in the code:

Example
<table>
  <tbody>
    <tr>
      <th>Morning<dialog open>This is an open dialog window</dialog></th>
      <th>Day</th>
      <th>Evening</th>
    </tr>
    <tr>
      <td>8:00</td>
      <td>12:00</td>
      <td>17:00</td>
    </tr>
  </tbody>
</table>

open is the most commonly used attribute for this tag. When it is set, the HTML dialog box is active and available for interaction. When it is not set, the box will not be displayed.

Note: you cannot use the tabindex attribute with HTML dialog tags.

Browser support

Chrome
37+
Edge
-
Firefox
53+
IE
-
Opera
24+
Safari
-

Mobile browser support

Chrome
37+
Firefox
53+
Opera
-
Safari
-
Basics
Introduction
Syntax
Editors
Basic Examples
Head Section
<!DOCTYPE>
Tags and Elements
Semantic Elements
Tags Reference
Attributes
Comments
Block and Inline Elements
Forms
Form Elements
Input
Responsive Web Design
Inline Scripts
Uniform Resource Locator
Redirect
XHTML
Geolocation
Drag and Drop
Local Storage
Web Workers
Server-Sent Events
Character Encoding
Text Formatting
Quotation and Citation Elements
Headings
Paragraphs
Links
Tables
Lists
Symbols
Space
Tab
Styles
Computer Code
Layout
Classes
Colors
Images
iframes
Audio Player
Video Player
YouTube Videos
Multimedia
Canvas
SVG
<!-- -->
<a>
<abbr>
<acronym> DEPRECATED
<address>
<applet> DEPRECATED
<article>
<aside>
<audio>
<b>
<base>
<basefont> DEPRECATED
<bdi>
<bdo>
<big> DEPRECATED
<blink> DEPRECATED
<blockquote>
<body>
<br>
<button>
<canvas>
<caption>
<center> DEPRECATED
<cite>
<code>
<col>
<colgroup>
<datalist>
<dd>
<del>
<details>
<dfn>
<dialog>
<dir> DEPRECATED
<div>
<dl>
<dt>
<em>
<embed>
<fieldset>
<figcaption>
<figure>
<font> DEPRECATED
<footer>
<form>
<frame> DEPRECATED
<frameset> DEPRECATED
<h1> – <h6>
<head>
<header>
<hr>
<html>
<i>
<iframe>
<img>
<input>
<ins>
<kbd>
<keygen> DEPRECATED
<label>
<legend>
<li>
<link>
<main>
<map>
<mark>
<menu>
<menuitem> DEPRECATED
<meta>
<meter>
<nav>
<noframes> DEPRECATED
<noscript>
<object>
<ol>
<optgroup>
<option>
<output>
<p>
<param>
<pre>
<progress>
<q>
<rp>
<rt>
<ruby>
<s>
<samp>
<script>
<section>
<select>
<small>
<source>
<span>
<strike> DEPRECATED
<strong>
<style>
<sub>
<summary>
<sup>
<table>
<tbody>
<td>
<tfoot>
<th>
<thead>
<time>
<title>
<tr>
<track>
<tt> DEPRECATED
<u>
<ul>
<var>
<video>
<wbr>