// HACKER NEWS — CYBERSECURITY
HTML Can Do That
HTML has been gobbling up swathes of what used to be JavaScript’s remit. This page lists a bunch of dynamic functionality that we can now achieve with just HTML.
Update 2026-08-20: I originally built this page in one hour during HTML Day 2026 to write and celebrate HTML, but I’ve since made some edits to better express and highlight where the browser implementation of some of this stuff is severely lacking and/or completely fails to meet accessibility needs. So, by all means, try it out, but make it as accessible as you can!
Light dismiss, Esc to close, no managing z-index to wrangle it onto a top later. All managed with popover and popovertarget attributes in HTML. (MDN)
No JavaScript, just modern browser magic, thanks to the wonderful folks speccing for the web and building our browsers!
Similar thing going on as popover here, except this time with a dedicated element for modal dialog boxes. (MDN)
See command / commandFor below for another, more recently-landing feature that allows us to open and close dialog elements (and will be useful for lots of other non-JS functionality, one day!).
Once again the popover attribute is doing some heavy-lifting here!
Even though it’s sort of against the spirit of this page, I want to include this short snippet of how to interact with dialog elements in JavaScript:
This one is opened with .showModal() and closed with .close(), both called from JavaScript.
A shared name attribute turns a group of into an exclusive accordion. Open one and the others close automatically. Magic! (MDN)