<dialog>


HTML <dialog> Tag

Instance

<!DOCTYPE html>
<html>
<head> 
<meta charset="utf-8"> 
<title>php中文网(php.cn)</title> 
</head>
<body>

<p><b>注意:</b>目前只有 Chrome 和 Safari 6 支持 dialog 标签。</p>


<table border="1">
<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>

Run Example»

Click the "Run Instance" button to view the online instance


Browser support

1000.png

##Currently, only Chrome and Safari 6 support <dialog> ; Label.


Tag definition and usage instructions

<dialog> The tag defines a dialog box, confirmation box or window.


Differences between HTML 4.01 and HTML5

The<dialog> tag is a new tag in HTML5.


Attribute

New: New attribute in HTML5.

PropertiesValueDescriptionopenopenSpecifies that the dialog element is valid and the user can interact with it.
New
Global attributes

<dialog> tag supports global attributes of HTML.


Event attributes

<dialog> tag supports HTML event attributes.