10-html-living-standard.demo.html
html-spec/examples/10-html-living-standard.demo.html · 91 line(s) · html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>HTML Living Standard (WHATWG) — Use-Case Demonstration</title>
</head>
<body>
<h1>HTML Living Standard (WHATWG) — Use-Case Demonstration</h1>
<p><strong>Date:</strong> 2026-10-25</p>
<p>
This document demonstrates the elements the modern Living Standard adds beyond HTML5 (native
dialogs, responsive/art-directed images, the search landmark, and the Web Components building
blocks) in their usual use cases. Each example states whether it
<em>performs as expected in a modern browser</em>: ✓ Yes, or ✗ No.
</p>
<hr>
<h2>Use case 1 — Native dialog</h2>
<p><strong>Title:</strong> A dialog box | <strong>Date:</strong> 2026-10-25</p>
<dialog open="open">
<p>This is a native dialog, shown because the <code>open</code> attribute is present.</p>
</dialog>
<p><strong>Performs as expected:</strong> ✓ Yes — <code><dialog></code> is a modern (post-HTML5) addition.</p>
<hr>
<h2>Use case 2 — Responsive / art-directed image</h2>
<p><strong>Title:</strong> picture with sources | <strong>Date:</strong> 2026-10-25</p>
<picture>
<source media="(min-width: 800px)" srcset="large.png">
<source media="(min-width: 400px)" srcset="medium.png">
<img src="https://www.w3.org/Icons/w3c_home" alt="W3C logo" width="72" height="48">
</picture>
<p><strong>Performs as expected:</strong> ✓ Yes — <code><picture></code> chooses a <code><source></code> by viewport; the <code><img></code> is the fallback.</p>
<hr>
<h2>Use case 3 — Responsive img with srcset</h2>
<p><strong>Title:</strong> Density/width switching | <strong>Date:</strong> 2026-10-25</p>
<img src="https://www.w3.org/Icons/w3c_home"
srcset="https://www.w3.org/Icons/w3c_home 1x, https://www.w3.org/Icons/w3c_home 2x"
alt="W3C logo" width="72" height="48">
<p><strong>Performs as expected:</strong> ✓ Yes</p>
<hr>
<h2>Use case 4 — Search landmark</h2>
<p><strong>Title:</strong> A search region | <strong>Date:</strong> 2026-10-25</p>
<search>
<form action="#" method="get">
<label for="s">Search the site:</label>
<input type="search" id="s" name="q">
<button type="submit">Go</button>
</form>
</search>
<p><strong>Performs as expected:</strong> ✓ Yes — <code><search></code> is a recent landmark element.</p>
<hr>
<h2>Use case 5 — Web Components: template + slot</h2>
<p><strong>Title:</strong> Shadow-tree building blocks | <strong>Date:</strong> 2026-10-25</p>
<template id="card-template">
<article>
<h4><slot name="heading">Default heading</slot></h4>
<p><slot name="body">Default body</slot></p>
</article>
</template>
<p>The <code><template></code> above defines inert markup; its <code><slot></code> elements are filled when a custom element instantiates it via script. (Not rendered until used.)</p>
<p><strong>Performs as expected:</strong> ✓ Yes — <code><slot></code> is the Web Components placeholder (requires script to populate).</p>
<hr>
<h2>Use case 6 — Customisable select content</h2>
<p><strong>Title:</strong> selectedcontent | <strong>Date:</strong> 2026-10-25</p>
<p>The newest <code><selectedcontent></code> element reflects a <code><select></code>'s chosen option content in a customisable control. It is very new and not yet widely implemented.</p>
<p><strong>Performs as expected:</strong> ✗ No — still limited/experimental browser support at this time; treat as progressive enhancement.</p>
<hr>
<p><strong>Summary:</strong> The established modern elements — <code>dialog</code>,
<code>picture</code>, <code>srcset</code>, <code>search</code>, <code>template</code>/<code>slot</code>
— perform as expected. The very newest addition, <code><selectedcontent></code>, does
not yet, owing to limited implementation.</p>
</body>
</html>