Aspect ratio calculator / Zero-JS Snippet Builder

Zero-JS Snippet Builder

Build a modal, tooltip, popover or accordion using only HTML attributes such as dialog, popover, commandfor, interestfor and details name. Pick a style, see a live preview in a script-blocked frame, check accessibility, see which browsers support it and copy the code. A small fallback script is optional.

Tool · 2026 · Aspect ratio calculator

Choose a component on the left, and the code, checks and support report update as you go. It has more room in full screen. Free to use.

What it is

Modern HTML can do things that used to need JavaScript: open a modal with commandfor, show a tooltip with interestfor, make a popover with popover and keep one accordion item open with <details name>. Zero-JS Snippet Builder assembles these for you and tells you where they work.

How to use it

  1. Choose a component and a style preset.
  2. Fill in the texts, and choose positioning and behavior options.
  3. Check the live preview, the accessibility notes and the browser support report.
  4. Copy the HTML, the CSS or everything. Turn on the fallback only if you need it.

Good to know

New features, uneven support. Some of these attributes are very new. Read the support report and test in the browsers your visitors use before you ship.

Files and license

Nothing you type is uploaded or stored. The code you generate is yours to use anywhere. The tool itself is provided to use on this page and is not offered for download or copying. A Korean version is here.

Questions

Is there really no JavaScript?

The default output has none. It uses HTML features the browser handles itself. If you turn on the fallback, a short script is added that runs only in browsers that lack the feature.

How do I know the preview is not running scripts?

The preview sits in an iframe with scripts blocked, and the page shows a badge that confirms it. The page also shows when an interaction worked through the browser alone.

Which browsers does it work in?

It depends on the feature. details with a name attribute, commandfor and interestfor and CSS anchor positioning arrived in different browsers at different times. The support table lists the minimum versions and tells you whether your own browser has each feature.

Where do the minimum versions come from?

They were checked on 2026-11-23 against MDN, caniuse, web.dev and the Chrome documentation. The Edge value for interestfor is an estimate. Check again before you rely on it, because support changes.

Can I share my settings?

Yes. The share link puts the current settings in the link itself, with nothing stored on a server.

Do the checks guarantee accessibility?

No. They catch common problems such as empty labels, but they are not a full audit. Test with a keyboard and a screen reader.

Does the fallback load anything from the internet?

The generated fallback for interestfor loads a polyfill from the jsDelivr CDN, and the tool notes that this path is an estimate. The tool page itself loads nothing from other sites.

Related tools and guides