English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية

HTML Reference Manual

HTML Tag Catalog

HTML dialog open attribute

This article introduces the HTML dialog open attribute, which is a boolean (boolean) attribute. After using this attribute, the specified dialog element is in an active state, and the user can interact with it. The online instance demonstrates how to use the HTML dialog open attribute, browser compatibility, syntax definition, and detailed information about its attribute values.

 HTML <dialog> tag

Online Example

Usage of <dialog> element:

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>HTML <dialog> open Attribute Usage-Basic Tutorial(oldtoolbag.com)</title>
<style>table, th, td { border: 1px solid black;/style>
</head>
<body>
<table>
  <tr>
    <th>January <dialog open> This is an open dialog window</dialog></th>
    <th>February</th>
    <th>March</th>
  </tr>
  <tr>
    <td>31</td>
    <td>28</td>
    <td>31</td>
  </tr>
</table>
</body>
</html>
Test and see ‹/›

Browser compatibility

IEFirefoxOperaChromeSafari

Currently only Chrome and Safari 6 Supports the open attribute.

Definition and usage

The open attribute is a boolean (boolean) attribute.

After using this attribute, the specified dialog element is in an active state and the user can interact with it.

HTML 4HTML1 between5differences

<dialog> tag is HTML5 New tags.

Differences between HTML and XHTML

In XHTML, attributes are not allowed to be abbreviated, the open attribute must be defined as: <dialog open="open">.

Syntax

<dialog open>

 HTML <dialog> tag