HTML Validator Lite - Online Check Syntax Errors
Paste HTML and detect unclosed tags, invalid nesting, and duplicate IDs. Lightweight client‑side validation.
UD5 Toolkit
Explore the Invoker Commands API — a declarative way to wire up buttons to dialogs, popovers, and more without writing any JavaScript. Part of the modern HTML specification for building cleaner, more accessible UIs.
commandfor
No JavaScript needed — the button opens and closes the dialog declaratively.
<!-- Button triggers dialog via commandfor --> <button commandfor="demoDialog" command="show-modal"> Open Dialog </button> <button commandfor="demoDialog" command="close"> Close Dialog </button> <!-- The dialog itself --> <dialog id="demoDialog"> <h5>Dialog Opened!</h5> <p>No JavaScript needed.</p> <!-- Internal close button --> <button commandfor="demoDialog" command="close"> Close </button> </dialog>
<button id="myBtn">Open</button> <dialog id="myDialog">...</dialog> <script> document.getElementById('myBtn') .addEventListener('click', () => { document.getElementById('myDialog') .showModal(); }); </script>
<!-- No JavaScript needed! --> <button commandfor="myDialog" command="show-modal"> Open </button> <dialog id="myDialog">...</dialog>
| Browser | commandfor / command | Popover API | Notes |
|---|---|---|---|
| Chrome | âś… 125+ | âś… 114+ | Full support |
| Edge | âś… 125+ | âś… 114+ | Full support |
| Firefox | ⚠️ Partial | ✅ 125+ | commandfor behind flag; popover supported |
| Safari | ❌ Not yet | ⚠️ 17+ | Under development |
Last updated: Check Can I Use for the latest support data. Progressive enhancement recommended.
commandfor attribute?
commandfor is an HTML attribute placed on a <button> that references the id of a target element
(like a <dialog> or popover). Combined with the command attribute, it declaratively wires up
interactive behavior without JavaScript. It's part of the Invoker Commands API specification.
command attribute take?
Currently supported values: show-modal (opens a dialog modally), close (closes a dialog),
show-popover, hide-popover, and toggle-popover.
The value you use depends on the target element type and desired behavior.
No. That's the entire point! In supporting browsers, commandfor + command
work entirely through the browser's built-in HTML parser and rendering engine. Zero JavaScript is required.
For unsupported browsers, you can add a small polyfill or fallback.
commandfor keeps behavior in HTML where it belongs, making intent clearer and code more maintainable.
It works even when JavaScript is blocked or fails, improves accessibility by leveraging native browser mechanics,
and eliminates boilerplate event listener code.
A single commandfor attribute references one target ID. To control multiple elements,
you'd need multiple buttons. However, you can have multiple buttons all targeting the same element with different
command values (e.g., one for show, one for hide).
The popover attribute is placed on the target element to designate it as a popover.
commandfor is placed on the triggering button to reference and control that popover.
They work together: popover makes an element a popover; commandfor controls it declaratively.
Currently, commandfor is primarily designed for <dialog> and popover elements.
The Invoker Commands API may expand to support custom elements and other interactive targets in future
specification updates. For forms, traditional form attributes are still recommended.
Use progressive enhancement: keep your commandfor buttons, and add a small feature-detection script
that checks 'commandFor' in HTMLButtonElement.prototype. If unsupported, attach traditional
addEventListener handlers as a fallback. This ensures all users get a working experience.
Paste HTML and detect unclosed tags, invalid nesting, and duplicate IDs. Lightweight client‑side validation.
Validate YAML syntax with line‑by‑line error messages. Also format messy YAML into clean, indented output. All in your browser.
Paste tab‑separated or CSV data and instantly get a beautifully aligned Markdown table. Essential for documentation.
Build 'I feel... when... because...' statements interactively. Improve communication in relationships. Local only.
Generate a random, funny or serious company slogan for your startup idea. Brainstorming helper. All local.
Paste your SQL query and check for basic syntax errors. Highlights missing commas, wrong keywords. Local analysis.
Find complementary, triadic, analogous, and split-complementary color combinations. Interactive color wheel. Essential for UI design.
Start with a word and find synonyms, then synonyms of synonyms. Build a chain and explore language. Local thesaurus.
Generate a camping checklist based on trip style (car, backpacking, glamping). Check off items. Fully local.
Paste HTML snippet and see calculated tab order. Identify missing focusable elements. A11y helper.
Enter notes or chords on a virtual fretboard and generate ASCII tablature. Quick way to share musical ideas.
Turn any sentence into mocking SpongeBob‑style text. Choose intensity. Copy and paste into chats. Pure client.
Enter adjusted gross score, course rating, and slope to calculate the round's handicap differential. Track your index.
Convert any text into its binary representation (8-bit per character). See the raw bits. Suitable for learning computer fundamentals. All local.
Generate a comprehensive first aid kit list for home, car, or hiking. Check off what you have.
Enter recent scores, course rating, and slope to estimate a golf handicap index. Simple formula for unofficial tracking. Local only.
Enter any phrase and instantly see if it's a palindrome, ignoring spaces and punctuation. Fun for word nerds.
Measure your handle circumference and preferred overlap to see how long your overgrip tape needs to be.
Generate tints (add white) and shades (add black) for any base hex color. Copy values for design systems. Instant local generation.
Take a perfectly fine phrase and insert realistic-looking typos. For pranks or testing spell‑checkers.
Check if a word or phrase is a palindrome (reads same forward and backward). Live validation and fun facts.
Paste your sitemap XML and check for missing namespaces, invalid URLs, or size limit violations. Keep your SEO healthy.
Quickly test SQL JOIN syntax (INNER, LEFT, RIGHT, FULL) with a sample database schema. Check logic and see conceptual result set without a real DB. Local only.
Shows a random short word and displays animated ASL fingerspelling letters. Type what you see. Improve receptive skills.
Instantly generate random UUIDs (version 4) for use as unique identifiers in software development. No registration, completely free and private.
Generate random Scattergories‑style lists with a random letter and 12 categories. Great for online game night.
Enter products with different prices and weights/volumes. The tool ranks them by best value per unit. Save money effortlessly.
Paste a test card number to verify Luhn algorithm, identify issuer (Visa, MC), and check length. No real data.
Enter your weight, height, boot sole length, and skier type to see the recommended DIN release setting.
Select parent colors and genotypes to predict possible offspring coat colors. Based on simple Mendelian genetics for common breeds.