Accessible Dialog Skeleton
HTML
Hard
2 views
Problem Description
Create a dialog element with a heading and a close button (no JS).
Output Format
Print the HTML code.
Constraints
Use dialog and a form method dialog.
Official Solution
<!doctype html>
<html lang='en'>
<head>
<meta charset='utf-8'>\
<meta name='viewport' content='width=device-width, initial-scale=1'>
<title>meetcode</title>
</head>
<body>
<dialog open>
<h2>meetcode notice</h2>
<p>Practice a little every day.</p>
<form method='dialog'>
<button>Close</button>
</form>
</dialog>
</body>
</html>
Solutions (0)
No solutions submitted yet. Be the first!
No comments yet. Start the discussion!