Interactive Elements

closedby="none"

Build a form with the HTML form generator

Allows only explicit developer-controlled closure, such as a form with method=dialog or close(). Provide an obvious accessible exit; do not use it to trap users. On dialog; missing or invalid defaults to auto, whose effective behavior depends on modal versus nonmodal opening. Check support independently from dialog itself.

Formal Syntax & Structure

html syntaxhtml
closedby="none"

Parameters & Attributes

NameTypeDescription
closedbykeywordAllows only explicit developer-controlled closure, such as a form with method=dialog or close(). Provide an obvious accessible exit; do not use it to trap users.

Working Example

Example Snippethtml
<button id="launch">Open dialog</button><dialog id="notice" closedby="none" aria-labelledby="heading">  <h2 id="heading">Notice</h2>  <form method="dialog">    <button>Close</button>  </form></dialog><script>  document.getElementById("launch").addEventListener("click",()=>document.getElementById("notice").showModal());</script>
HTML Reference