plain-site › native

Native components

The other half of the toolkit is current HTML, not obsolete. These elements come with a look and a behaviour built in: boxes, disclosure triangles, coloured gauges, modals, popups. Every one of them is keyboard-accessible and screen-reader-labelled by default, which a hand-built widget almost never is.


■ <fieldset>: a box with a title

The only conforming element that draws a border round its content. It is meant for form groups. A <legend> breaks the top edge, and align="right" (obsolete) moves it.


■ <details>: show and hide, no script

Click the summary to open it. Several <details> that share a name form an accordion: opening one closes the others. Browser find-in-page (Ctrl+F) opens the one that holds the match.


■ <meter>: colour that means something

A gauge that the browser colours itself: green when the value is in the optimum region, yellow in the next region, red in the furthest. Set low, high and optimum and the colours follow. It is the conforming way to show good / bad with colour, and the text beside it carries the meaning.


■ Dialogs and popovers, declaratively

commandfor + command open and close a <dialog> with no script. A modal dialog dims the page, traps focus, and closes on Esc. popover + popovertarget makes a light popup that closes when you click elsewhere. Both draw a bordered box by default.


※ commandfor and closedby are new (they reached all the major engines during 2025 and 2026). A browser without them shows a button that does nothing, so check your audience, or add a small module fallback.

■ Form controls: free widgets

Date pickers, colour pickers, sliders, suggestion lists, validation with error bubbles. All native, all drawn by the OS or browser to match the platform.


■ Tooltips, shortcuts, find-in-page

title gives a hover tooltip. accesskey gives a keyboard shortcut (Alt+key in Chrome, Alt+Shift+key in Firefox, Ctrl+Option+key on a Mac). That is 90s practicality: a menu you can drive without a mouse. hidden="until-found" hides a section that find-in-page can still reveal.



▲ top ・ plain-site ・ previous: layout ・ next: museum