Show HN: A guide to all HTML5 elements and attributes
I believe your kbd example is incorrect. You suggest<p>> <i>To save, press <kbd>Ctrl + S</kbd>.</i><p>But the spec (both W3C and WHATWG) suggests that individual keys should be nested inside an outer <kbd> tag: "When the kbd element is nested inside another kbd element, it represents an actual key or other single unit of input as appropriate for the input mechanism."<p>Thus, the example should be:<p>> <i>To save, press <kbd><kbd>Ctrl</kbd> + <kbd>S</kbd></kbd>.</i><p>Cite: <a href="https://w3c.github.io/html/textlevel-semantics.html#the-kbd-element" rel="nofollow">https://w3c.github.io/html/textlevel-semantics.html#the-kbd-...</a><p>On the face of it, this seems ridiculous. It's too verbose, the tag name is misleading, and if you actually <i>use</i> the correct markup on GitHub or StackOverflow, it will render incorrectly because both sites assume the standalone <kbd> element represents physical keyboard buttons.<p>On the other hand, what's the value in semantic markup if we don't adhere to its semantics?<p>Practically speaking, I would be a happier person today if I hadn't read that part of the spec, and instead persisted on in blissful ignorance of the element's intended semantics. Thanks, specs.