ironhtml_elements/
lib.rs

1//! # ironhtml-elements
2//!
3//! Type-safe HTML5 elements following the
4//! [WHATWG HTML Living Standard](https://html.spec.whatwg.org/).
5//!
6//! This crate provides zero-sized types for all HTML5 elements with traits
7//! for content categories, enabling compile-time validation of HTML structure.
8//!
9//! ## Example
10//!
11//! ```rust
12//! use ironhtml_elements::{Div, Span, A, Img, HtmlElement};
13//! use ironhtml_elements::{FlowContent, PhrasingContent, EmbeddedContent};
14//!
15//! // Access element tag names
16//! assert_eq!(Div::TAG, "div");
17//! assert_eq!(A::TAG, "a");
18//!
19//! // Check if an element is void (self-closing)
20//! assert!(!Div::VOID);  // <div></div>
21//! assert!(Img::VOID);   // <img />
22//!
23//! // Use traits to constrain valid element usage
24//! fn accepts_flow<T: FlowContent>() {}
25//! fn accepts_phrasing<T: PhrasingContent>() {}
26//!
27//! accepts_flow::<Div>();      // OK - div is flow content
28//! accepts_flow::<Span>();     // OK - span is flow content
29//! accepts_phrasing::<Span>(); // OK - span is phrasing content
30//! // accepts_phrasing::<Div>(); // ERROR - div is not phrasing content
31//! ```
32//!
33//! ## Specification References
34//!
35//! - [Content categories](https://html.spec.whatwg.org/multipage/dom.html#content-models)
36//! - [Element index](https://html.spec.whatwg.org/multipage/indices.html#elements-3)
37//! - [Void elements](https://html.spec.whatwg.org/multipage/syntax.html#void-elements)
38//!
39//! ## Design Decisions
40//!
41//! ### Zero-Sized Types (ZSTs) for Elements
42//!
43//! Each HTML element is defined as a unit struct with no fields.
44//! This design provides zero runtime overhead - ZSTs occupy no memory:
45//!
46//! ```rust
47//! use ironhtml_elements::{Div, Span, A};
48//! use core::mem::size_of;
49//!
50//! // All element types are zero-sized
51//! assert_eq!(size_of::<Div>(), 0);
52//! assert_eq!(size_of::<Span>(), 0);
53//! assert_eq!(size_of::<A>(), 0);
54//! ```
55//!
56//! Benefits:
57//!
58//! - **Zero runtime overhead**: ZSTs occupy no memory at runtime. The type
59//!   exists only at compile time for type checking.
60//! - **Compile-time markers**: Elements serve as type-level tags that carry
61//!   semantic meaning without any runtime representation.
62//! - **Optimal codegen**: The Rust compiler can completely eliminate ZSTs
63//!   during optimization, resulting in no additional instructions.
64//!
65//! ### Traits for Content Categories
66//!
67//! Content categories from the WHATWG spec are modeled as marker traits
68//! with a hierarchy that reflects the specification:
69//!
70//! ```rust
71//! use ironhtml_elements::{Div, Span, Article, H1};
72//! use ironhtml_elements::{FlowContent, PhrasingContent, SectioningContent, HeadingContent};
73//!
74//! // Generic functions can require specific content categories
75//! fn accepts_flow<T: FlowContent>() {}
76//! fn accepts_phrasing<T: PhrasingContent>() {}
77//! fn accepts_sectioning<T: SectioningContent>() {}
78//!
79//! // Div is flow content
80//! accepts_flow::<Div>();
81//!
82//! // Span is phrasing content (and therefore also flow content)
83//! accepts_phrasing::<Span>();
84//! accepts_flow::<Span>();
85//!
86//! // Article is sectioning content
87//! accepts_sectioning::<Article>();
88//! ```
89//!
90//! This design enables:
91//!
92//! - **Compile-time constraint checking**: Generic functions can require
93//!   elements to belong to specific content categories.
94//! - **Trait hierarchy reflects spec**: The supertrait relationships
95//!   (e.g., `PhrasingContent: FlowContent`) mirror the WHATWG specification
96//!   where all phrasing content is also flow content.
97//! - **Extensibility**: New element types can implement these traits to
98//!   integrate with existing validation logic.
99//!
100//! ### The `CanContain` Pattern
101//!
102//! Parent-child relationships use a binary trait pattern:
103//!
104//! ```rust
105//! use ironhtml_elements::{Div, Span, Ul, Li, Table, Tr, Td, P, CanContain};
106//!
107//! // Check valid parent-child relationships at compile time
108//! fn can_nest<Parent: CanContain<Child>, Child>() {}
109//!
110//! // Lists: Ul can contain Li
111//! can_nest::<Ul, Li>();
112//!
113//! // Tables: Table contains Tr, Tr contains Td
114//! can_nest::<Tr, Td>();
115//!
116//! // Div can contain any flow content
117//! can_nest::<Div, P>();
118//! can_nest::<Div, Span>();
119//! can_nest::<Div, Ul>();
120//!
121//! // Span can contain phrasing content
122//! can_nest::<Span, Span>();
123//! ```
124//!
125//! This design provides:
126//!
127//! - **Compile-time validation**: Invalid nesting like `<ul><div>` or
128//!   `<p><div>` produces a compilation error rather than a runtime error.
129//! - **Precise control**: Each parent-child relationship is explicitly
130//!   declared, matching the WHATWG content model specification.
131//! - **Generic implementations**: Using trait bounds like `impl<T: FlowContent>`
132//!   avoids listing every valid child element individually while still
133//!   providing type safety.
134//!
135//! ### Why This Approach?
136//!
137//! Traditional HTML builders use runtime validation or stringly-typed APIs
138//! where errors are only discovered at runtime or not at all. For example,
139//! `builder.element("div").child("invalid")` might error at runtime, or
140//! invalid nesting like putting a `<li>` directly in a `<div>` might silently
141//! produce malformed HTML.
142//!
143//! This crate instead leverages Rust's type system to make invalid HTML
144//! structures impossible to represent. The compiler becomes your HTML
145//! validator, catching errors before your code even runs.
146
147#![no_std]
148
149extern crate alloc;
150
151// =============================================================================
152// Content Categories (per WHATWG HTML Living Standard)
153// https://html.spec.whatwg.org/multipage/dom.html#content-models
154// =============================================================================
155
156/// Metadata content: elements that set up the presentation or behavior of
157/// the rest of the content, or set up relationships with other documents.
158pub trait MetadataContent {}
159
160/// Flow content: most elements used in the body of documents and applications.
161pub trait FlowContent {}
162
163/// Sectioning content: elements that define the scope of headings and footers.
164pub trait SectioningContent: FlowContent {}
165
166/// Heading content: elements that define the header of a section.
167pub trait HeadingContent: FlowContent {}
168
169/// Phrasing content: the text of the document and elements that mark up that text.
170pub trait PhrasingContent: FlowContent {}
171
172/// Embedded content: elements that import another resource into the document.
173pub trait EmbeddedContent: PhrasingContent {}
174
175/// Interactive content: elements specifically intended for user interaction.
176pub trait InteractiveContent: FlowContent {}
177
178/// Palpable content: content that is not empty or hidden.
179pub trait PalpableContent {}
180
181/// Script-supporting elements: elements that don't represent anything themselves.
182pub trait ScriptSupporting {}
183
184// =============================================================================
185// Content Model Trait
186// https://html.spec.whatwg.org/multipage/dom.html#content-models
187// =============================================================================
188
189/// Trait indicating that an element can contain another element as a child.
190///
191/// This trait enables compile-time validation of parent-child relationships
192/// in HTML documents according to the WHATWG specification.
193///
194/// ## Example
195///
196/// ```rust
197/// use ironhtml_elements::{CanContain, Div, Span, P, Ul, Li, Table, Tr, Td, Text};
198///
199/// // Check valid parent-child relationships
200/// fn valid_child<Parent, Child>() where Parent: CanContain<Child> {}
201///
202/// valid_child::<Div, Span>();   // OK - div can contain span
203/// valid_child::<Div, P>();      // OK - div can contain p
204/// valid_child::<Ul, Li>();      // OK - ul can contain li
205/// valid_child::<Tr, Td>();      // OK - tr can contain td
206/// valid_child::<Div, Text>();   // OK - div can contain text
207/// // valid_child::<P, Div>();   // ERROR - p cannot contain div (block in inline)
208/// // valid_child::<Ul, Div>();  // ERROR - ul can only contain li
209/// ```
210pub trait CanContain<Child> {}
211
212// =============================================================================
213// Element Trait
214// =============================================================================
215
216/// Trait implemented by all HTML elements.
217pub trait HtmlElement {
218    /// The HTML tag name (e.g., "div", "span", "img").
219    const TAG: &'static str;
220
221    /// Whether this is a void element (self-closing, no children allowed).
222    const VOID: bool = false;
223}
224
225// =============================================================================
226// Text Node (special pseudo-element for content model)
227// =============================================================================
228
229/// Represents a text node in the DOM.
230pub struct Text;
231
232// =============================================================================
233// Document Metadata Elements
234// =============================================================================
235
236/// The `<html>` element - the root element of an HTML document.
237///
238/// # Purpose
239///
240/// The `<html>` element represents the root (top-level element) of an HTML document.
241/// All other elements must be descendants of this element. It establishes the document
242/// as an HTML document and provides a container for the entire page content.
243///
244/// # Content Categories
245///
246/// - None (root element, not categorized)
247///
248/// # Permitted Content Model
249///
250/// - One `<head>` element followed by one `<body>` element.
251///
252/// # Common Use Cases
253///
254/// - Root container for every HTML document
255/// - Container for setting document-wide attributes like `lang`
256/// - Container for document-level metadata via `<head>`
257///
258/// # Key Attributes
259///
260/// - `lang`: Specifies the primary language of the document (e.g., `"en"`, `"es"`, `"fr"`)
261/// - Global attributes
262///
263/// # Example
264///
265/// ```html
266/// <!DOCTYPE html>
267/// <html lang="en">
268///   <head>
269///     <meta charset="UTF-8">
270///     <title>Document Title</title>
271///   </head>
272///   <body>
273///     <h1>Hello, World!</h1>
274///   </body>
275/// </html>
276/// ```
277///
278/// # WHATWG Specification
279///
280/// - [4.1.1 The html element](https://html.spec.whatwg.org/multipage/semantics.html#the-html-element)
281pub struct Html;
282impl HtmlElement for Html {
283    const TAG: &'static str = "html";
284}
285
286/// The `<head>` element - container for document metadata.
287///
288/// # Purpose
289///
290/// The `<head>` element contains machine-readable metadata about the document,
291/// including its title, scripts, stylesheets, and other meta information.
292/// This content is not displayed to users but is essential for browsers,
293/// search engines, and other services.
294///
295/// # Content Categories
296///
297/// - Metadata Content
298///
299/// # Permitted Content Model
300///
301/// - Zero or more metadata content elements (e.g., `<title>`, `<meta>`, `<link>`, `<style>`, `<script>`, `<base>`)
302/// - Must include exactly one `<title>` element
303///
304/// # Common Use Cases
305///
306/// - Defining the document title
307/// - Linking to stylesheets and scripts
308/// - Specifying character encoding
309/// - Adding SEO meta tags
310/// - Providing social media metadata (Open Graph, Twitter Cards)
311///
312/// # Key Attributes
313///
314/// - Global attributes only
315///
316/// # Example
317///
318/// ```html
319/// <head>
320///   <meta charset="UTF-8">
321///   <meta name="viewport" content="width=device-width, initial-scale=1.0">
322///   <title>My Web Page</title>
323///   <link rel="stylesheet" href="styles.css">
324///   <script src="app.js" defer></script>
325/// </head>
326/// ```
327///
328/// # WHATWG Specification
329///
330/// - [4.2.1 The head element](https://html.spec.whatwg.org/multipage/semantics.html#the-head-element)
331pub struct Head;
332impl HtmlElement for Head {
333    const TAG: &'static str = "head";
334}
335impl MetadataContent for Head {}
336
337/// The `<title>` element - document title.
338///
339/// # Purpose
340///
341/// The `<title>` element defines the title of the document, shown in the browser's
342/// title bar or tab. It is also used by search engines as the page title in search
343/// results and is important for SEO and accessibility.
344///
345/// # Content Categories
346///
347/// - Metadata Content
348///
349/// # Permitted Content Model
350///
351/// - Text content only (no child elements)
352///
353/// # Common Use Cases
354///
355/// - Setting the browser tab/window title
356/// - Providing the page title for search engine results
357/// - Defining the default bookmark name
358/// - Displaying the page title when sharing on social media
359///
360/// # Key Attributes
361///
362/// - Global attributes only (rarely used)
363///
364/// # Example
365///
366/// ```html
367/// <head>
368///   <title>Introduction to HTML - Web Development Tutorial</title>
369/// </head>
370/// ```
371///
372/// # Accessibility
373///
374/// - The title is announced by screen readers when navigating to a page
375/// - Should be descriptive and unique for each page
376/// - Typically 50-60 characters for optimal display in search results
377///
378/// # WHATWG Specification
379///
380/// - [4.2.2 The title element](https://html.spec.whatwg.org/multipage/semantics.html#the-title-element)
381pub struct Title;
382impl HtmlElement for Title {
383    const TAG: &'static str = "title";
384}
385impl MetadataContent for Title {}
386
387/// The `<base>` element - document base URL.
388///
389/// # Purpose
390///
391/// The `<base>` element specifies the base URL to use for all relative URLs in a document.
392/// There can be only one `<base>` element in a document, and it must be inside the `<head>` element.
393///
394/// # Content Categories
395///
396/// - Metadata Content
397///
398/// # Permitted Content Model
399///
400/// - None (void element)
401///
402/// # Common Use Cases
403///
404/// - Setting a base URL for all relative links in a document
405/// - Specifying default target for all links
406/// - Useful for single-page applications or sites with complex URL structures
407///
408/// # Key Attributes
409///
410/// - `href`: Base URL for relative URLs
411/// - `target`: Default browsing context for links (e.g., `"_blank"`, `"_self"`)
412///
413/// # Example
414///
415/// ```html
416/// <head>
417///   <base href="https://example.com/" target="_blank">
418///   <link rel="stylesheet" href="styles.css">
419///   <!-- Resolves to https://example.com/styles.css -->
420/// </head>
421/// ```
422///
423/// # WHATWG Specification
424///
425/// - [4.2.3 The base element](https://html.spec.whatwg.org/multipage/semantics.html#the-base-element)
426pub struct Base;
427impl HtmlElement for Base {
428    const TAG: &'static str = "base";
429    const VOID: bool = true;
430}
431impl MetadataContent for Base {}
432
433/// The `<link>` element - external resource link.
434///
435/// # Purpose
436///
437/// The `<link>` element specifies relationships between the current document and external resources.
438/// Most commonly used to link to stylesheets, but also used for favicons, alternate versions,
439/// preloading resources, and more.
440///
441/// # Content Categories
442///
443/// - Metadata Content
444///
445/// # Permitted Content Model
446///
447/// - None (void element)
448///
449/// # Common Use Cases
450///
451/// - Linking to external CSS stylesheets
452/// - Specifying favicons and touch icons
453/// - Defining alternate language versions of a page
454/// - Preloading or prefetching resources
455/// - Linking to RSS/Atom feeds
456///
457/// # Key Attributes
458///
459/// - `rel`: Relationship type (e.g., `"stylesheet"`, `"icon"`, `"preload"`, `"canonical"`)
460/// - `href`: URL of the linked resource
461/// - `type`: MIME type of the linked resource
462/// - `media`: Media query for conditional loading (mainly for stylesheets)
463/// - `as`: Type of content being preloaded (when `rel="preload"`)
464///
465/// # Example
466///
467/// ```html
468/// <head>
469///   <link rel="stylesheet" href="styles.css">
470///   <link rel="icon" type="image/png" href="/favicon.png">
471///   <link rel="preload" href="font.woff2" as="font" type="font/woff2" crossorigin>
472///   <link rel="alternate" hreflang="es" href="https://example.com/es/">
473/// </head>
474/// ```
475///
476/// # WHATWG Specification
477///
478/// - [4.2.4 The link element](https://html.spec.whatwg.org/multipage/semantics.html#the-link-element)
479pub struct Link;
480impl HtmlElement for Link {
481    const TAG: &'static str = "link";
482    const VOID: bool = true;
483}
484impl MetadataContent for Link {}
485
486/// The `<meta>` element - document metadata.
487///
488/// # Purpose
489///
490/// The `<meta>` element represents various kinds of metadata that cannot be represented
491/// by other HTML meta-related elements (`<title>`, `<base>`, `<link>`, `<style>`).
492/// Used for character encoding, viewport settings, SEO, and social media metadata.
493///
494/// # Content Categories
495///
496/// - Metadata Content
497///
498/// # Permitted Content Model
499///
500/// - None (void element)
501///
502/// # Common Use Cases
503///
504/// - Setting character encoding (`charset`)
505/// - Configuring viewport for responsive design
506/// - Providing page description for search engines
507/// - Adding Open Graph tags for social media sharing
508/// - Setting HTTP headers via `http-equiv`
509///
510/// # Key Attributes
511///
512/// - `charset`: Character encoding declaration (e.g., `"UTF-8"`)
513/// - `name`: Metadata name (e.g., `"viewport"`, `"description"`, `"author"`)
514/// - `content`: Metadata value (used with `name` or `http-equiv`)
515/// - `http-equiv`: Pragma directive (e.g., `"refresh"`, `"content-security-policy"`)
516///
517/// # Example
518///
519/// ```html
520/// <head>
521///   <meta charset="UTF-8">
522///   <meta name="viewport" content="width=device-width, initial-scale=1.0">
523///   <meta name="description" content="A comprehensive guide to HTML5">
524///   <meta property="og:title" content="HTML5 Guide">
525///   <meta property="og:image" content="https://example.com/image.png">
526/// </head>
527/// ```
528///
529/// # WHATWG Specification
530///
531/// - [4.2.5 The meta element](https://html.spec.whatwg.org/multipage/semantics.html#the-meta-element)
532pub struct Meta;
533impl HtmlElement for Meta {
534    const TAG: &'static str = "meta";
535    const VOID: bool = true;
536}
537impl MetadataContent for Meta {}
538
539/// The `<style>` element - embedded CSS styles.
540///
541/// # Purpose
542///
543/// The `<style>` element contains CSS style information for the document.
544/// It allows you to embed styles directly in HTML without an external stylesheet.
545///
546/// # Content Categories
547///
548/// - Metadata Content
549///
550/// # Permitted Content Model
551///
552/// - Text content representing CSS rules
553///
554/// # Common Use Cases
555///
556/// - Embedding critical CSS for performance optimization
557/// - Adding page-specific styles without a separate file
558/// - Inline styles for email templates
559/// - Dynamic styling that changes based on server-side conditions
560///
561/// # Key Attributes
562///
563/// - `media`: Media query for conditional application of styles
564/// - `type`: MIME type (defaults to `"text/css"`, usually omitted)
565/// - `nonce`: Cryptographic nonce for Content Security Policy
566///
567/// # Example
568///
569/// ```html
570/// <head>
571///   <style>
572///     body {
573///       font-family: sans-serif;
574///       margin: 0;
575///     }
576///     .container {
577///       max-width: 1200px;
578///       margin: 0 auto;
579///     }
580///   </style>
581///   <style media="print">
582///     .no-print { display: none; }
583///   </style>
584/// </head>
585/// ```
586///
587/// # WHATWG Specification
588///
589/// - [4.2.6 The style element](https://html.spec.whatwg.org/multipage/semantics.html#the-style-element)
590pub struct Style;
591impl HtmlElement for Style {
592    const TAG: &'static str = "style";
593}
594impl MetadataContent for Style {}
595
596// =============================================================================
597// Sectioning Root
598// =============================================================================
599
600/// The `<body>` element - document body.
601///
602/// # Purpose
603///
604/// The `<body>` element represents the main content of an HTML document.
605/// There can be only one `<body>` element per document, and it contains all
606/// the visible content that is displayed to users.
607///
608/// # Content Categories
609///
610/// - Sectioning Root
611///
612/// # Permitted Content Model
613///
614/// - Flow content (most visible HTML elements)
615///
616/// # Common Use Cases
617///
618/// - Container for all visible page content
619/// - Structuring the main layout of a webpage
620/// - Applying document-wide styles via CSS
621/// - Attaching document-level event handlers
622///
623/// # Key Attributes
624///
625/// - Event handler attributes (`onload`, `onunload`, `onbeforeunload`, etc.)
626/// - Global attributes
627///
628/// # Example
629///
630/// ```html
631/// <body>
632///   <header>
633///     <h1>My Website</h1>
634///     <nav>...</nav>
635///   </header>
636///   <main>
637///     <article>...</article>
638///   </main>
639///   <footer>
640///     <p>&copy; 2024 My Website</p>
641///   </footer>
642/// </body>
643/// ```
644///
645/// # WHATWG Specification
646///
647/// - [4.3.1 The body element](https://html.spec.whatwg.org/multipage/sections.html#the-body-element)
648pub struct Body;
649impl HtmlElement for Body {
650    const TAG: &'static str = "body";
651}
652
653// =============================================================================
654// Content Sectioning Elements
655// =============================================================================
656
657/// The `<article>` element - self-contained composition.
658///
659/// # Purpose
660///
661/// The `<article>` element represents a self-contained composition in a document,
662/// page, application, or site, which is intended to be independently distributable
663/// or reusable (e.g., in syndication). Examples include blog posts, news articles,
664/// forum posts, product cards, user comments, and interactive widgets.
665///
666/// # Content Categories
667///
668/// - Flow Content
669/// - Sectioning Content
670/// - Palpable Content
671///
672/// # Permitted Content Model
673///
674/// - Flow content
675///
676/// # Common Use Cases
677///
678/// - Blog posts and news articles
679/// - Forum or comment posts
680/// - Product cards in e-commerce sites
681/// - Independently distributable widgets
682/// - User-submitted content
683///
684/// # Key Attributes
685///
686/// - Global attributes only
687///
688/// # Example
689///
690/// ```html
691/// <article>
692///   <header>
693///     <h2>Understanding HTML5 Semantics</h2>
694///     <p>Posted on <time datetime="2024-01-15">January 15, 2024</time></p>
695///   </header>
696///   <p>Semantic HTML elements provide meaning to web content...</p>
697///   <footer>
698///     <p>Written by Jane Doe</p>
699///   </footer>
700/// </article>
701/// ```
702///
703/// # Accessibility
704///
705/// - Screen readers may announce article boundaries
706/// - Consider using `<h1>`-`<h6>` for article headings
707/// - Each article should be independently understandable
708///
709/// # WHATWG Specification
710///
711/// - [4.3.2 The article element](https://html.spec.whatwg.org/multipage/sections.html#the-article-element)
712pub struct Article;
713impl HtmlElement for Article {
714    const TAG: &'static str = "article";
715}
716impl FlowContent for Article {}
717impl SectioningContent for Article {}
718impl PalpableContent for Article {}
719
720/// The `<section>` element - thematic grouping of content.
721///
722/// # Purpose
723///
724/// The `<section>` element represents a generic standalone section of a document,
725/// which doesn't have a more specific semantic element to represent it. Sections
726/// should typically have a heading, and they group related content thematically.
727///
728/// # Content Categories
729///
730/// - Flow Content
731/// - Sectioning Content
732/// - Palpable Content
733///
734/// # Permitted Content Model
735///
736/// - Flow content
737///
738/// # Common Use Cases
739///
740/// - Thematic grouping of content (chapters, tabs in a tabbed interface)
741/// - Different sections of an article or document
742/// - Grouping related content with a heading
743/// - Creating document outlines with hierarchical sections
744///
745/// # Key Attributes
746///
747/// - Global attributes only
748///
749/// # Example
750///
751/// ```html
752/// <article>
753///   <h1>The Complete Guide to Web Development</h1>
754///   <section>
755///     <h2>Introduction</h2>
756///     <p>Web development encompasses...</p>
757///   </section>
758///   <section>
759///     <h2>Frontend Technologies</h2>
760///     <p>HTML, CSS, and JavaScript form...</p>
761///   </section>
762///   <section>
763///     <h2>Backend Technologies</h2>
764///     <p>Server-side programming...</p>
765///   </section>
766/// </article>
767/// ```
768///
769/// # Accessibility
770///
771/// - Each section should have a heading for proper document outline
772/// - Screen readers use sections to navigate content structure
773///
774/// # WHATWG Specification
775///
776/// - [4.3.3 The section element](https://html.spec.whatwg.org/multipage/sections.html#the-section-element)
777pub struct Section;
778impl HtmlElement for Section {
779    const TAG: &'static str = "section";
780}
781impl FlowContent for Section {}
782impl SectioningContent for Section {}
783impl PalpableContent for Section {}
784
785/// The `<nav>` element - navigation links.
786///
787/// # Purpose
788///
789/// The `<nav>` element represents a section of a page that contains navigation links,
790/// either within the current document or to other documents. Not all groups of links
791/// need to be in a `<nav>` element—only sections that consist of major navigation blocks.
792///
793/// # Content Categories
794///
795/// - Flow Content
796/// - Sectioning Content
797/// - Palpable Content
798///
799/// # Permitted Content Model
800///
801/// - Flow content (but not `<main>` element)
802///
803/// # Common Use Cases
804///
805/// - Primary site navigation (header menu)
806/// - Table of contents
807/// - Pagination controls
808/// - Breadcrumb navigation
809/// - Footer site links
810///
811/// # Key Attributes
812///
813/// - Global attributes only
814/// - `aria-label`: Distinguishes multiple nav elements on same page
815///
816/// # Example
817///
818/// ```html
819/// <nav aria-label="Main navigation">
820///   <ul>
821///     <li><a href="/">Home</a></li>
822///     <li><a href="/about">About</a></li>
823///     <li><a href="/products">Products</a></li>
824///     <li><a href="/contact">Contact</a></li>
825///   </ul>
826/// </nav>
827/// ```
828///
829/// # Accessibility
830///
831/// - Screen readers provide shortcuts to navigate to `<nav>` landmarks
832/// - Use `aria-label` or `aria-labelledby` when multiple navs exist
833/// - Not every group of links needs to be in `<nav>`
834///
835/// # WHATWG Specification
836///
837/// - [4.3.4 The nav element](https://html.spec.whatwg.org/multipage/sections.html#the-nav-element)
838pub struct Nav;
839impl HtmlElement for Nav {
840    const TAG: &'static str = "nav";
841}
842impl FlowContent for Nav {}
843impl SectioningContent for Nav {}
844impl PalpableContent for Nav {}
845
846/// The `<aside>` element - tangentially related content.
847///
848/// # Purpose
849///
850/// The `<aside>` element represents content that is tangentially related to the
851/// content around it, which could be considered separate from that content.
852/// Such sections are often represented as sidebars or call-out boxes.
853///
854/// # Content Categories
855///
856/// - Flow Content
857/// - Sectioning Content
858/// - Palpable Content
859///
860/// # Permitted Content Model
861///
862/// - Flow content
863///
864/// # Common Use Cases
865///
866/// - Sidebars with related links or content
867/// - Pull quotes or callouts
868/// - Advertising
869/// - Groups of nav elements (e.g., blogrolls, secondary navigation)
870/// - Related articles or "You might also like" sections
871///
872/// # Key Attributes
873///
874/// - Global attributes only
875///
876/// # Example
877///
878/// ```html
879/// <article>
880///   <h1>Climate Change Impact</h1>
881///   <p>Recent studies show...</p>
882///   <aside>
883///     <h2>Related Articles</h2>
884///     <ul>
885///       <li><a href="/renewable-energy">Renewable Energy</a></li>
886///       <li><a href="/carbon-footprint">Carbon Footprint</a></li>
887///     </ul>
888///   </aside>
889/// </article>
890/// ```
891///
892/// # Accessibility
893///
894/// - Screen readers identify `<aside>` as a complementary landmark
895/// - Content should be understandable even if aside is removed
896///
897/// # WHATWG Specification
898///
899/// - [4.3.5 The aside element](https://html.spec.whatwg.org/multipage/sections.html#the-aside-element)
900pub struct Aside;
901impl HtmlElement for Aside {
902    const TAG: &'static str = "aside";
903}
904impl FlowContent for Aside {}
905impl SectioningContent for Aside {}
906impl PalpableContent for Aside {}
907
908/// The `<h1>` element - level 1 heading.
909///
910/// # Purpose
911///
912/// The `<h1>` element represents the highest level (most important) heading in a document.
913/// It typically represents the main title or subject of the page or section. There should
914/// generally be only one `<h1>` per page for SEO and accessibility best practices.
915///
916/// # Content Categories
917///
918/// - Flow Content
919/// - Heading Content
920/// - Palpable Content
921///
922/// # Permitted Content Model
923///
924/// - Phrasing content
925///
926/// # Common Use Cases
927///
928/// - Main page title
929/// - Primary heading for the document
930/// - Top-level section heading
931///
932/// # Key Attributes
933///
934/// - Global attributes only
935///
936/// # Example
937///
938/// ```html
939/// <article>
940///   <h1>Introduction to Web Accessibility</h1>
941///   <p>Web accessibility ensures that websites...</p>
942/// </article>
943/// ```
944///
945/// # Accessibility
946///
947/// - Screen readers use headings for navigation
948/// - Should have only one `<h1>` per page
949/// - Creates the document outline structure
950///
951/// # WHATWG Specification
952///
953/// - [4.3.6 The h1-h6 elements](https://html.spec.whatwg.org/multipage/sections.html#the-h1,-h2,-h3,-h4,-h5,-and-h6-elements)
954pub struct H1;
955impl HtmlElement for H1 {
956    const TAG: &'static str = "h1";
957}
958impl FlowContent for H1 {}
959impl HeadingContent for H1 {}
960impl PalpableContent for H1 {}
961
962/// The `<h2>` element - level 2 heading.
963///
964/// # Purpose
965///
966/// The `<h2>` element represents a second-level heading, typically used for major
967/// sections within a document. It's subordinate to `<h1>` and superior to `<h3>`.
968///
969/// # Content Categories
970///
971/// - Flow Content
972/// - Heading Content
973/// - Palpable Content
974///
975/// # Permitted Content Model
976///
977/// - Phrasing content
978///
979/// # Common Use Cases
980///
981/// - Major section headings
982/// - Chapter titles in longer documents
983/// - Main subsections under the `<h1>` heading
984///
985/// # Key Attributes
986///
987/// - Global attributes only
988///
989/// # Example
990///
991/// ```html
992/// <h1>Complete Guide to HTML</h1>
993/// <h2>Basic Elements</h2>
994/// <p>HTML provides various basic elements...</p>
995/// <h2>Semantic Elements</h2>
996/// <p>Semantic elements give meaning...</p>
997/// ```
998///
999/// # Accessibility
1000///
1001/// - Creates hierarchical document structure
1002/// - Should follow heading order (don't skip levels)
1003/// - Screen readers use for navigation
1004///
1005/// # WHATWG Specification
1006///
1007/// - [4.3.6 The h1-h6 elements](https://html.spec.whatwg.org/multipage/sections.html#the-h1,-h2,-h3,-h4,-h5,-and-h6-elements)
1008pub struct H2;
1009impl HtmlElement for H2 {
1010    const TAG: &'static str = "h2";
1011}
1012impl FlowContent for H2 {}
1013impl HeadingContent for H2 {}
1014impl PalpableContent for H2 {}
1015
1016/// The `<h3>` element - level 3 heading.
1017///
1018/// # Purpose
1019///
1020/// The `<h3>` element represents a third-level heading, used for subsections
1021/// within `<h2>` sections. Part of the hierarchical heading structure.
1022///
1023/// # Content Categories
1024///
1025/// - Flow Content
1026/// - Heading Content
1027/// - Palpable Content
1028///
1029/// # Permitted Content Model
1030///
1031/// - Phrasing content
1032///
1033/// # Common Use Cases
1034///
1035/// - Subsection headings within `<h2>` sections
1036/// - Detailed topic divisions
1037/// - Third-level document structure
1038///
1039/// # Key Attributes
1040///
1041/// - Global attributes only
1042///
1043/// # Example
1044///
1045/// ```html
1046/// <h2>Frontend Development</h2>
1047/// <h3>HTML</h3>
1048/// <p>HTML provides structure...</p>
1049/// <h3>CSS</h3>
1050/// <p>CSS handles styling...</p>
1051/// <h3>JavaScript</h3>
1052/// <p>JavaScript adds interactivity...</p>
1053/// ```
1054///
1055/// # Accessibility
1056///
1057/// - Maintains document outline hierarchy
1058/// - Should not skip heading levels
1059/// - Helps screen reader users navigate
1060///
1061/// # WHATWG Specification
1062///
1063/// - [4.3.6 The h1-h6 elements](https://html.spec.whatwg.org/multipage/sections.html#the-h1,-h2,-h3,-h4,-h5,-and-h6-elements)
1064pub struct H3;
1065impl HtmlElement for H3 {
1066    const TAG: &'static str = "h3";
1067}
1068impl FlowContent for H3 {}
1069impl HeadingContent for H3 {}
1070impl PalpableContent for H3 {}
1071
1072/// The `<h4>` element - level 4 heading.
1073///
1074/// # Purpose
1075///
1076/// The `<h4>` element represents a fourth-level heading, used for subsections
1077/// within `<h3>` sections. Part of the hierarchical heading structure.
1078///
1079/// # Content Categories
1080///
1081/// - Flow Content
1082/// - Heading Content
1083/// - Palpable Content
1084///
1085/// # Permitted Content Model
1086///
1087/// - Phrasing content
1088///
1089/// # Common Use Cases
1090///
1091/// - Sub-subsection headings
1092/// - Detailed breakdowns within `<h3>` sections
1093/// - Fine-grained document structure
1094///
1095/// # Key Attributes
1096///
1097/// - Global attributes only
1098///
1099/// # Example
1100///
1101/// ```html
1102/// <h3>JavaScript Basics</h3>
1103/// <h4>Variables</h4>
1104/// <p>Variables store data...</p>
1105/// <h4>Functions</h4>
1106/// <p>Functions are reusable blocks...</p>
1107/// ```
1108///
1109/// # Accessibility
1110///
1111/// - Part of document outline
1112/// - Helps organize complex content
1113/// - Screen readers use for navigation
1114///
1115/// # WHATWG Specification
1116///
1117/// - [4.3.6 The h1-h6 elements](https://html.spec.whatwg.org/multipage/sections.html#the-h1,-h2,-h3,-h4,-h5,-and-h6-elements)
1118pub struct H4;
1119impl HtmlElement for H4 {
1120    const TAG: &'static str = "h4";
1121}
1122impl FlowContent for H4 {}
1123impl HeadingContent for H4 {}
1124impl PalpableContent for H4 {}
1125
1126/// The `<h5>` element - level 5 heading.
1127///
1128/// # Purpose
1129///
1130/// The `<h5>` element represents a fifth-level heading, used for subsections
1131/// within `<h4>` sections. Part of the hierarchical heading structure.
1132///
1133/// # Content Categories
1134///
1135/// - Flow Content
1136/// - Heading Content
1137/// - Palpable Content
1138///
1139/// # Permitted Content Model
1140///
1141/// - Phrasing content
1142///
1143/// # Common Use Cases
1144///
1145/// - Deep subsection headings
1146/// - Detailed documentation sections
1147/// - Complex hierarchical content
1148///
1149/// # Key Attributes
1150///
1151/// - Global attributes only
1152///
1153/// # Example
1154///
1155/// ```html
1156/// <h4>Array Methods</h4>
1157/// <h5>Mutating Methods</h5>
1158/// <p>Methods that modify the original array...</p>
1159/// <h5>Non-Mutating Methods</h5>
1160/// <p>Methods that return a new array...</p>
1161/// ```
1162///
1163/// # Accessibility
1164///
1165/// - Rarely needed in typical documents
1166/// - Maintains document outline
1167/// - Use only when deep hierarchy is needed
1168///
1169/// # WHATWG Specification
1170///
1171/// - [4.3.6 The h1-h6 elements](https://html.spec.whatwg.org/multipage/sections.html#the-h1,-h2,-h3,-h4,-h5,-and-h6-elements)
1172pub struct H5;
1173impl HtmlElement for H5 {
1174    const TAG: &'static str = "h5";
1175}
1176impl FlowContent for H5 {}
1177impl HeadingContent for H5 {}
1178impl PalpableContent for H5 {}
1179
1180/// The `<h6>` element - level 6 heading.
1181///
1182/// # Purpose
1183///
1184/// The `<h6>` element represents the lowest level (sixth-level) heading,
1185/// used for the finest grain of subsections. Rarely used in practice.
1186///
1187/// # Content Categories
1188///
1189/// - Flow Content
1190/// - Heading Content
1191/// - Palpable Content
1192///
1193/// # Permitted Content Model
1194///
1195/// - Phrasing content
1196///
1197/// # Common Use Cases
1198///
1199/// - Very deep subsection headings
1200/// - Highly detailed technical documentation
1201/// - Complex nested content structures
1202///
1203/// # Key Attributes
1204///
1205/// - Global attributes only
1206///
1207/// # Example
1208///
1209/// ```html
1210/// <h5>Specific Use Cases</h5>
1211/// <h6>Edge Case 1</h6>
1212/// <p>When dealing with legacy browsers...</p>
1213/// <h6>Edge Case 2</h6>
1214/// <p>In certain mobile scenarios...</p>
1215/// ```
1216///
1217/// # Accessibility
1218///
1219/// - Least commonly used heading level
1220/// - Consider if such deep hierarchy is necessary
1221/// - Screen readers support all heading levels
1222///
1223/// # WHATWG Specification
1224///
1225/// - [4.3.6 The h1-h6 elements](https://html.spec.whatwg.org/multipage/sections.html#the-h1,-h2,-h3,-h4,-h5,-and-h6-elements)
1226pub struct H6;
1227impl HtmlElement for H6 {
1228    const TAG: &'static str = "h6";
1229}
1230impl FlowContent for H6 {}
1231impl HeadingContent for H6 {}
1232impl PalpableContent for H6 {}
1233
1234/// The `<hgroup>` element - heading group.
1235///
1236/// # Purpose
1237///
1238/// The `<hgroup>` element represents a heading and related content (typically subheadings,
1239/// alternative titles, or taglines). It groups a heading with secondary content like
1240/// subtitles or taglines, treating them as a single heading in the document outline.
1241///
1242/// # Content Categories
1243///
1244/// - Flow Content
1245/// - Heading Content
1246/// - Palpable Content
1247///
1248/// # Permitted Content Model
1249///
1250/// - One or more `<h1>`-`<h6>` elements, optionally intermixed with `<p>` elements
1251///
1252/// # Common Use Cases
1253///
1254/// - Grouping a title with a subtitle
1255/// - Combining a heading with a tagline
1256/// - Multi-line headings with different semantic levels
1257///
1258/// # Key Attributes
1259///
1260/// - Global attributes only
1261///
1262/// # Example
1263///
1264/// ```html
1265/// <hgroup>
1266///   <h1>HTML5 Elements Reference</h1>
1267///   <p>A comprehensive guide to semantic HTML</p>
1268/// </hgroup>
1269/// ```
1270///
1271/// # Accessibility
1272///
1273/// - Screen readers treat the group as a single heading
1274/// - Only the highest-ranked heading affects document outline
1275///
1276/// # WHATWG Specification
1277///
1278/// - [4.3.7 The hgroup element](https://html.spec.whatwg.org/multipage/sections.html#the-hgroup-element)
1279pub struct Hgroup;
1280impl HtmlElement for Hgroup {
1281    const TAG: &'static str = "hgroup";
1282}
1283impl FlowContent for Hgroup {}
1284impl HeadingContent for Hgroup {}
1285impl PalpableContent for Hgroup {}
1286
1287/// The `<header>` element - introductory content.
1288///
1289/// # Purpose
1290///
1291/// The `<header>` element represents introductory content or navigational aids.
1292/// It typically contains heading elements, logos, search forms, author information,
1293/// or navigation. A page can have multiple `<header>` elements (e.g., page header
1294/// and article headers).
1295///
1296/// # Content Categories
1297///
1298/// - Flow Content
1299/// - Palpable Content
1300///
1301/// # Permitted Content Model
1302///
1303/// - Flow content (but not `<header>`, `<footer>`, or `<main>` descendants)
1304///
1305/// # Common Use Cases
1306///
1307/// - Site-wide page header with logo and navigation
1308/// - Article or section headers with title and metadata
1309/// - Introduction to a piece of content
1310/// - Masthead for a page or section
1311///
1312/// # Key Attributes
1313///
1314/// - Global attributes only
1315///
1316/// # Example
1317///
1318/// ```html
1319/// <header>
1320///   <img src="logo.png" alt="Company Logo">
1321///   <h1>My Website</h1>
1322///   <nav>
1323///     <a href="/">Home</a>
1324///     <a href="/about">About</a>
1325///   </nav>
1326/// </header>
1327///
1328/// <article>
1329///   <header>
1330///     <h2>Article Title</h2>
1331///     <p>By John Doe, <time datetime="2024-01-15">Jan 15, 2024</time></p>
1332///   </header>
1333///   <p>Article content...</p>
1334/// </article>
1335/// ```
1336///
1337/// # Accessibility
1338///
1339/// - Screen readers may identify headers as landmarks
1340/// - Can contain navigation for the section it introduces
1341///
1342/// # WHATWG Specification
1343///
1344/// - [4.3.8 The header element](https://html.spec.whatwg.org/multipage/sections.html#the-header-element)
1345pub struct Header;
1346impl HtmlElement for Header {
1347    const TAG: &'static str = "header";
1348}
1349impl FlowContent for Header {}
1350impl PalpableContent for Header {}
1351
1352/// The `<footer>` element - footer content.
1353///
1354/// # Purpose
1355///
1356/// The `<footer>` element represents footer content for its nearest ancestor sectioning
1357/// content or sectioning root. Typically contains information about the author, copyright,
1358/// related links, or other metadata. A page can have multiple `<footer>` elements.
1359///
1360/// # Content Categories
1361///
1362/// - Flow Content
1363/// - Palpable Content
1364///
1365/// # Permitted Content Model
1366///
1367/// - Flow content (but not `<header>`, `<footer>`, or `<main>` descendants)
1368///
1369/// # Common Use Cases
1370///
1371/// - Site-wide footer with copyright and links
1372/// - Article or section footers with metadata
1373/// - Author information and related content
1374/// - Contact information and social links
1375///
1376/// # Key Attributes
1377///
1378/// - Global attributes only
1379///
1380/// # Example
1381///
1382/// ```html
1383/// <footer>
1384///   <p>&copy; 2024 My Company. All rights reserved.</p>
1385///   <nav>
1386///     <a href="/privacy">Privacy Policy</a>
1387///     <a href="/terms">Terms of Service</a>
1388///   </nav>
1389/// </footer>
1390///
1391/// <article>
1392///   <h1>Blog Post</h1>
1393///   <p>Content...</p>
1394///   <footer>
1395///     <p>Posted by <a href="/author">Jane Doe</a></p>
1396///     <p>Tags: <a href="/tag/html">HTML</a>, <a href="/tag/web">Web</a></p>
1397///   </footer>
1398/// </article>
1399/// ```
1400///
1401/// # Accessibility
1402///
1403/// - Screen readers may identify footers as landmarks
1404/// - Often contains important navigation and legal information
1405///
1406/// # WHATWG Specification
1407///
1408/// - [4.3.9 The footer element](https://html.spec.whatwg.org/multipage/sections.html#the-footer-element)
1409pub struct Footer;
1410impl HtmlElement for Footer {
1411    const TAG: &'static str = "footer";
1412}
1413impl FlowContent for Footer {}
1414impl PalpableContent for Footer {}
1415
1416/// The `<address>` element - contact information.
1417///
1418/// # Purpose
1419///
1420/// The `<address>` element represents contact information for its nearest `<article>` or
1421/// `<body>` ancestor. This could be physical address, email, phone, social media, or any
1422/// contact method. It should not be used for arbitrary addresses.
1423///
1424/// # Content Categories
1425///
1426/// - Flow Content
1427/// - Palpable Content
1428///
1429/// # Permitted Content Model
1430///
1431/// - Flow content (but no heading content, sectioning content, `<header>`, `<footer>`, or `<address>` descendants)
1432///
1433/// # Common Use Cases
1434///
1435/// - Author contact information
1436/// - Business contact details
1437/// - Article author information
1438/// - Organization contact info in page footer
1439///
1440/// # Key Attributes
1441///
1442/// - Global attributes only
1443///
1444/// # Example
1445///
1446/// ```html
1447/// <footer>
1448///   <address>
1449///     <p>Contact us:</p>
1450///     <p>Email: <a href="mailto:info@example.com">info@example.com</a></p>
1451///     <p>Phone: <a href="tel:+15551234567">+1 (555) 123-4567</a></p>
1452///     <p>123 Main St, City, State 12345</p>
1453///   </address>
1454/// </footer>
1455///
1456/// <article>
1457///   <h1>Article Title</h1>
1458///   <p>Content...</p>
1459///   <footer>
1460///     <address>
1461///       Written by <a href="mailto:author@example.com">Jane Doe</a>
1462///     </address>
1463///   </footer>
1464/// </article>
1465/// ```
1466///
1467/// # Accessibility
1468///
1469/// - Screen readers may announce address regions
1470/// - Makes contact information easily discoverable
1471///
1472/// # WHATWG Specification
1473///
1474/// - [4.3.10 The address element](https://html.spec.whatwg.org/multipage/sections.html#the-address-element)
1475pub struct Address;
1476impl HtmlElement for Address {
1477    const TAG: &'static str = "address";
1478}
1479impl FlowContent for Address {}
1480impl PalpableContent for Address {}
1481
1482/// The `<main>` element - main content.
1483///
1484/// # Purpose
1485///
1486/// The `<main>` element represents the dominant content of the `<body>` of a document.
1487/// The main content area consists of content directly related to or expanding upon the
1488/// central topic. There should be only one `<main>` element per page (not hidden).
1489///
1490/// # Content Categories
1491///
1492/// - Flow Content
1493/// - Palpable Content
1494///
1495/// # Permitted Content Model
1496///
1497/// - Flow content
1498///
1499/// # Common Use Cases
1500///
1501/// - Main content area of a webpage
1502/// - Primary content excluding headers, footers, and navigation
1503/// - Content unique to the page (not repeated across pages)
1504/// - Central topic or functionality of a page
1505///
1506/// # Key Attributes
1507///
1508/// - Global attributes only
1509///
1510/// # Example
1511///
1512/// ```html
1513/// <body>
1514///   <header>
1515///     <h1>My Website</h1>
1516///     <nav>...</nav>
1517///   </header>
1518///   
1519///   <main>
1520///     <h2>Welcome to Our Site</h2>
1521///     <article>
1522///       <h3>Latest News</h3>
1523///       <p>Content...</p>
1524///     </article>
1525///   </main>
1526///   
1527///   <footer>...</footer>
1528/// </body>
1529/// ```
1530///
1531/// # Accessibility
1532///
1533/// - Screen readers provide shortcuts to jump to `<main>` content
1534/// - Critical for keyboard navigation and skip links
1535/// - Only one visible `<main>` per page
1536///
1537/// # WHATWG Specification
1538///
1539/// - [4.3.11 The main element](https://html.spec.whatwg.org/multipage/grouping-content.html#the-main-element)
1540pub struct Main;
1541impl HtmlElement for Main {
1542    const TAG: &'static str = "main";
1543}
1544impl FlowContent for Main {}
1545impl PalpableContent for Main {}
1546
1547// =============================================================================
1548// Text Content Elements
1549// =============================================================================
1550
1551/// The `<div>` element - generic container.
1552///
1553/// # Purpose
1554///
1555/// The `<div>` element is a generic container for flow content. It has no semantic meaning
1556/// and should be used only when no other semantic element is appropriate. It's primarily
1557/// used for styling purposes or as a container for scripting.
1558///
1559/// # Content Categories
1560///
1561/// - Flow Content
1562/// - Palpable Content (if it has at least one child)
1563///
1564/// # Permitted Content Model
1565///
1566/// - Flow content
1567///
1568/// # Common Use Cases
1569///
1570/// - Layout containers for CSS Grid or Flexbox
1571/// - Grouping elements for styling with CSS classes
1572/// - JavaScript manipulation targets
1573/// - Generic wrappers when no semantic element fits
1574///
1575/// # Key Attributes
1576///
1577/// - Global attributes only (commonly `class`, `id`, `style`)
1578///
1579/// # Example
1580///
1581/// ```html
1582/// <div class="container">
1583///   <div class="header">
1584///     <h1>Page Title</h1>
1585///   </div>
1586///   <div class="content">
1587///     <p>Main content...</p>
1588///   </div>
1589/// </div>
1590/// ```
1591///
1592/// # WHATWG Specification
1593///
1594/// - [4.4.15 The div element](https://html.spec.whatwg.org/multipage/grouping-content.html#the-div-element)
1595pub struct Div;
1596impl HtmlElement for Div {
1597    const TAG: &'static str = "div";
1598}
1599impl FlowContent for Div {}
1600impl PalpableContent for Div {}
1601
1602/// The `<p>` element - paragraph.
1603///
1604/// # Purpose
1605///
1606/// The `<p>` element represents a paragraph of text. It's one of the most commonly
1607/// used HTML elements for organizing textual content into distinct blocks.
1608///
1609/// # Content Categories
1610///
1611/// - Flow Content
1612/// - Palpable Content
1613///
1614/// # Permitted Content Model
1615///
1616/// - Phrasing content (no block-level elements like `<div>`, `<p>`, or headings)
1617///
1618/// # Common Use Cases
1619///
1620/// - Body text in articles and documents
1621/// - Descriptive text blocks
1622/// - Text content in any context
1623/// - Structuring prose content
1624///
1625/// # Key Attributes
1626///
1627/// - Global attributes only
1628///
1629/// # Example
1630///
1631/// ```html
1632/// <article>
1633///   <h1>Introduction to HTML</h1>
1634///   <p>HTML (HyperText Markup Language) is the standard markup language
1635///   for creating web pages.</p>
1636///   <p>It describes the structure of web pages using markup elements
1637///   called tags.</p>
1638/// </article>
1639/// ```
1640///
1641/// # Accessibility
1642///
1643/// - Screen readers pause between paragraphs
1644/// - Natural text structure for reading flow
1645///
1646/// # WHATWG Specification
1647///
1648/// - [4.4.1 The p element](https://html.spec.whatwg.org/multipage/grouping-content.html#the-p-element)
1649pub struct P;
1650impl HtmlElement for P {
1651    const TAG: &'static str = "p";
1652}
1653impl FlowContent for P {}
1654impl PalpableContent for P {}
1655
1656/// The `<hr>` element - thematic break.
1657///
1658/// # Purpose
1659///
1660/// The `<hr>` element represents a thematic break between paragraph-level elements,
1661/// such as a scene change in a story or a shift in topic. It's displayed as a
1662/// horizontal rule but carries semantic meaning beyond visual presentation.
1663///
1664/// # Content Categories
1665///
1666/// - Flow Content
1667///
1668/// # Permitted Content Model
1669///
1670/// - None (void element)
1671///
1672/// # Common Use Cases
1673///
1674/// - Separating sections in a document
1675/// - Indicating topic shifts within content
1676/// - Visual and semantic breaks in text flow
1677/// - Scene changes in narrative content
1678///
1679/// # Key Attributes
1680///
1681/// - Global attributes only
1682///
1683/// # Example
1684///
1685/// ```html
1686/// <section>
1687///   <h2>Chapter 1</h2>
1688///   <p>The story begins...</p>
1689/// </section>
1690/// <hr>
1691/// <section>
1692///   <h2>Chapter 2</h2>
1693///   <p>Meanwhile, in another place...</p>
1694/// </section>
1695/// ```
1696///
1697/// # WHATWG Specification
1698///
1699/// - [4.4.2 The hr element](https://html.spec.whatwg.org/multipage/grouping-content.html#the-hr-element)
1700pub struct Hr;
1701impl HtmlElement for Hr {
1702    const TAG: &'static str = "hr";
1703    const VOID: bool = true;
1704}
1705impl FlowContent for Hr {}
1706
1707/// The `<pre>` element - preformatted text.
1708///
1709/// # Purpose
1710///
1711/// The `<pre>` element represents preformatted text where whitespace (spaces, tabs,
1712/// line breaks) is preserved exactly as written in the HTML. Text is typically
1713/// displayed in a monospace font.
1714///
1715/// # Content Categories
1716///
1717/// - Flow Content
1718/// - Palpable Content
1719///
1720/// # Permitted Content Model
1721///
1722/// - Phrasing content
1723///
1724/// # Common Use Cases
1725///
1726/// - Displaying code snippets (often with `<code>`)
1727/// - ASCII art or text diagrams
1728/// - Preserving formatting of plain text
1729/// - Command-line output or logs
1730/// - Poetry or text where line breaks matter
1731///
1732/// # Key Attributes
1733///
1734/// - Global attributes only
1735///
1736/// # Example
1737///
1738/// ```html
1739/// <pre><code>function hello() {
1740///   console.log("Hello, World!");
1741/// }</code></pre>
1742///
1743/// <pre>
1744///    /\_/\
1745///   ( o.o )
1746///    > ^ <
1747/// </pre>
1748/// ```
1749///
1750/// # WHATWG Specification
1751///
1752/// - [4.4.3 The pre element](https://html.spec.whatwg.org/multipage/grouping-content.html#the-pre-element)
1753pub struct Pre;
1754impl HtmlElement for Pre {
1755    const TAG: &'static str = "pre";
1756}
1757impl FlowContent for Pre {}
1758impl PalpableContent for Pre {}
1759
1760/// The `<blockquote>` element - block quotation.
1761///
1762/// # Purpose
1763///
1764/// The `<blockquote>` element represents a section that is quoted from another source.
1765/// It's used for longer quotations that span multiple lines or paragraphs, as opposed
1766/// to inline quotes which use `<q>`.
1767///
1768/// # Content Categories
1769///
1770/// - Flow Content
1771/// - Palpable Content
1772///
1773/// # Permitted Content Model
1774///
1775/// - Flow content
1776///
1777/// # Common Use Cases
1778///
1779/// - Long quotations from other sources
1780/// - Testimonials and reviews
1781/// - Excerpts from books or articles
1782/// - Citations in academic or professional writing
1783///
1784/// # Key Attributes
1785///
1786/// - `cite`: URL of the source document or message
1787/// - Global attributes
1788///
1789/// # Example
1790///
1791/// ```html
1792/// <blockquote cite="https://www.example.com/article">
1793///   <p>The future belongs to those who believe in the beauty
1794///   of their dreams.</p>
1795///   <footer>— Eleanor Roosevelt</footer>
1796/// </blockquote>
1797///
1798/// <p>As the specification states:</p>
1799/// <blockquote>
1800///   <p>The blockquote element represents content that is quoted
1801///   from another source.</p>
1802/// </blockquote>
1803/// ```
1804///
1805/// # WHATWG Specification
1806///
1807/// - [4.4.4 The blockquote element](https://html.spec.whatwg.org/multipage/grouping-content.html#the-blockquote-element)
1808pub struct Blockquote;
1809impl HtmlElement for Blockquote {
1810    const TAG: &'static str = "blockquote";
1811}
1812impl FlowContent for Blockquote {}
1813impl PalpableContent for Blockquote {}
1814
1815/// The `<ol>` element - ordered list.
1816///
1817/// # Purpose
1818///
1819/// The `<ol>` element represents an ordered list of items, where the order is
1820/// meaningful. Items are typically numbered but can use other markers like
1821/// letters or Roman numerals.
1822///
1823/// # Content Categories
1824///
1825/// - Flow Content
1826/// - Palpable Content (if it has at least one `<li>` child)
1827///
1828/// # Permitted Content Model
1829///
1830/// - Zero or more `<li>` and script-supporting elements
1831///
1832/// # Common Use Cases
1833///
1834/// - Step-by-step instructions or procedures
1835/// - Ranked lists (top 10, etc.)
1836/// - Sequential content where order matters
1837/// - Table of contents with numbered sections
1838/// - Legal or technical document numbering
1839///
1840/// # Key Attributes
1841///
1842/// - `reversed`: Reverses the numbering order
1843/// - `start`: Starting number for the list (e.g., `start="5"`)
1844/// - `type`: Numbering type (`"1"`, `"A"`, `"a"`, `"I"`, `"i"`)
1845/// - Global attributes
1846///
1847/// # Example
1848///
1849/// ```html
1850/// <h2>Recipe Instructions</h2>
1851/// <ol>
1852///   <li>Preheat oven to 350°F</li>
1853///   <li>Mix dry ingredients</li>
1854///   <li>Add wet ingredients</li>
1855///   <li>Bake for 25 minutes</li>
1856/// </ol>
1857///
1858/// <ol type="A" start="3">
1859///   <li>Option C</li>
1860///   <li>Option D</li>
1861/// </ol>
1862/// ```
1863///
1864/// # Accessibility
1865///
1866/// - Screen readers announce list with item count
1867/// - Sequential numbering aids comprehension
1868///
1869/// # WHATWG Specification
1870///
1871/// - [4.4.5 The ol element](https://html.spec.whatwg.org/multipage/grouping-content.html#the-ol-element)
1872pub struct Ol;
1873impl HtmlElement for Ol {
1874    const TAG: &'static str = "ol";
1875}
1876impl FlowContent for Ol {}
1877impl PalpableContent for Ol {}
1878
1879/// The `<ul>` element - unordered list.
1880///
1881/// # Purpose
1882///
1883/// The `<ul>` element represents an unordered list of items, where the order is not
1884/// meaningful. Items are typically marked with bullets or other symbols.
1885///
1886/// # Content Categories
1887///
1888/// - Flow Content
1889/// - Palpable Content (if it has at least one `<li>` child)
1890///
1891/// # Permitted Content Model
1892///
1893/// - Zero or more `<li>` and script-supporting elements
1894///
1895/// # Common Use Cases
1896///
1897/// - Feature lists
1898/// - Navigation menus
1899/// - Collections of related items
1900/// - Tag or category lists
1901/// - Any list where order doesn't matter
1902///
1903/// # Key Attributes
1904///
1905/// - Global attributes only
1906///
1907/// # Example
1908///
1909/// ```html
1910/// <h2>Features</h2>
1911/// <ul>
1912///   <li>Fast performance</li>
1913///   <li>Easy to use</li>
1914///   <li>Highly customizable</li>
1915///   <li>Mobile-friendly</li>
1916/// </ul>
1917///
1918/// <nav>
1919///   <ul>
1920///     <li><a href="/">Home</a></li>
1921///     <li><a href="/about">About</a></li>
1922///     <li><a href="/contact">Contact</a></li>
1923///   </ul>
1924/// </nav>
1925/// ```
1926///
1927/// # Accessibility
1928///
1929/// - Screen readers announce list type and item count
1930/// - Provides semantic grouping of related items
1931///
1932/// # WHATWG Specification
1933///
1934/// - [4.4.6 The ul element](https://html.spec.whatwg.org/multipage/grouping-content.html#the-ul-element)
1935pub struct Ul;
1936impl HtmlElement for Ul {
1937    const TAG: &'static str = "ul";
1938}
1939impl FlowContent for Ul {}
1940impl PalpableContent for Ul {}
1941
1942/// The `<menu>` element - menu of commands.
1943///
1944/// # Purpose
1945///
1946/// The `<menu>` element represents a group of commands or a list of options that a
1947/// user can perform or activate. It's semantically similar to `<ul>` but specifically
1948/// for interactive commands or options.
1949///
1950/// # Content Categories
1951///
1952/// - Flow Content
1953/// - Palpable Content (if it has at least one `<li>` child)
1954///
1955/// # Permitted Content Model
1956///
1957/// - Zero or more `<li>`, `<script>`, and `<template>` elements
1958///
1959/// # Common Use Cases
1960///
1961/// - Toolbar buttons
1962/// - Context menus
1963/// - List of commands or actions
1964/// - Interactive option lists
1965///
1966/// # Key Attributes
1967///
1968/// - Global attributes only
1969///
1970/// # Example
1971///
1972/// ```html
1973/// <menu>
1974///   <li><button type="button">New File</button></li>
1975///   <li><button type="button">Open</button></li>
1976///   <li><button type="button">Save</button></li>
1977///   <li><button type="button">Exit</button></li>
1978/// </menu>
1979/// ```
1980///
1981/// # WHATWG Specification
1982///
1983/// - [4.4.7 The menu element](https://html.spec.whatwg.org/multipage/grouping-content.html#the-menu-element)
1984pub struct Menu;
1985impl HtmlElement for Menu {
1986    const TAG: &'static str = "menu";
1987}
1988impl FlowContent for Menu {}
1989impl PalpableContent for Menu {}
1990
1991/// The `<li>` element - list item.
1992///
1993/// # Purpose
1994///
1995/// The `<li>` element represents a list item within ordered (`<ol>`), unordered (`<ul>`),
1996/// or menu (`<menu>`) lists. It's the container for individual items in a list structure.
1997///
1998/// # Content Categories
1999///
2000/// - None (only valid as child of `<ol>`, `<ul>`, or `<menu>`)
2001///
2002/// # Permitted Content Model
2003///
2004/// - Flow content
2005///
2006/// # Common Use Cases
2007///
2008/// - Items in ordered or unordered lists
2009/// - Navigation menu items
2010/// - Steps in procedures
2011/// - Feature or specification lists
2012///
2013/// # Key Attributes
2014///
2015/// - `value`: Ordinal value for the item (only in `<ol>`)
2016/// - Global attributes
2017///
2018/// # Example
2019///
2020/// ```html
2021/// <ul>
2022///   <li>First item</li>
2023///   <li>Second item with <strong>emphasis</strong></li>
2024///   <li>
2025///     Third item with nested content
2026///     <ul>
2027///       <li>Nested item</li>
2028///     </ul>
2029///   </li>
2030/// </ul>
2031///
2032/// <ol>
2033///   <li value="10">Start at 10</li>
2034///   <li>This will be 11</li>
2035/// </ol>
2036/// ```
2037///
2038/// # Accessibility
2039///
2040/// - Screen readers announce list position (e.g., "item 1 of 3")
2041///
2042/// # WHATWG Specification
2043///
2044/// - [4.4.8 The li element](https://html.spec.whatwg.org/multipage/grouping-content.html#the-li-element)
2045pub struct Li;
2046impl HtmlElement for Li {
2047    const TAG: &'static str = "li";
2048}
2049
2050/// The `<dl>` element - description list.
2051///
2052/// # Purpose
2053///
2054/// The `<dl>` element represents an association list consisting of zero or more
2055/// name-value groups (term-description pairs). Common uses include glossaries,
2056/// metadata, or key-value pairs.
2057///
2058/// # Content Categories
2059///
2060/// - Flow Content
2061/// - Palpable Content (if it has at least one name-value pair)
2062///
2063/// # Permitted Content Model
2064///
2065/// - Zero or more groups of one or more `<dt>` elements followed by one or more `<dd>` elements
2066/// - Optionally intermixed with `<script>` and `<template>` elements
2067/// - Can also contain `<div>` elements wrapping `<dt>` and `<dd>` groups
2068///
2069/// # Common Use Cases
2070///
2071/// - Glossaries and definitions
2072/// - Metadata or property lists
2073/// - FAQ sections (question-answer pairs)
2074/// - Product specifications
2075///
2076/// # Key Attributes
2077///
2078/// - Global attributes only
2079///
2080/// # Example
2081///
2082/// ```html
2083/// <dl>
2084///   <dt>HTML</dt>
2085///   <dd>HyperText Markup Language</dd>
2086///   
2087///   <dt>CSS</dt>
2088///   <dd>Cascading Style Sheets</dd>
2089///   
2090///   <dt>JavaScript</dt>
2091///   <dt>JS</dt>
2092///   <dd>A programming language for web browsers</dd>
2093/// </dl>
2094/// ```
2095///
2096/// # Accessibility
2097///
2098/// - Screen readers may announce term-description relationships
2099///
2100/// # WHATWG Specification
2101///
2102/// - [4.4.9 The dl element](https://html.spec.whatwg.org/multipage/grouping-content.html#the-dl-element)
2103pub struct Dl;
2104impl HtmlElement for Dl {
2105    const TAG: &'static str = "dl";
2106}
2107impl FlowContent for Dl {}
2108impl PalpableContent for Dl {}
2109
2110/// The `<dt>` element - description term.
2111///
2112/// # Purpose
2113///
2114/// The `<dt>` element represents the term or name part of a term-description group
2115/// in a description list (`<dl>`). It specifies the term being defined or described.
2116///
2117/// # Content Categories
2118///
2119/// - None (only valid as child of `<dl>` or `<div>` within `<dl>`)
2120///
2121/// # Permitted Content Model
2122///
2123/// - Flow content (but no `<header>`, `<footer>`, sectioning, or heading content descendants)
2124///
2125/// # Common Use Cases
2126///
2127/// - Term in a glossary
2128/// - Property name in metadata
2129/// - Question in FAQ
2130/// - Label in key-value pairs
2131///
2132/// # Key Attributes
2133///
2134/// - Global attributes only
2135///
2136/// # Example
2137///
2138/// ```html
2139/// <dl>
2140///   <dt>Name</dt>
2141///   <dd>John Doe</dd>
2142///   
2143///   <dt>Email</dt>
2144///   <dd>john@example.com</dd>
2145///   
2146///   <dt>What is HTML?</dt>
2147///   <dd>HTML is the standard markup language for web pages.</dd>
2148/// </dl>
2149/// ```
2150///
2151/// # WHATWG Specification
2152///
2153/// - [4.4.10 The dt element](https://html.spec.whatwg.org/multipage/grouping-content.html#the-dt-element)
2154pub struct Dt;
2155impl HtmlElement for Dt {
2156    const TAG: &'static str = "dt";
2157}
2158
2159/// The `<dd>` element - description details.
2160///
2161/// # Purpose
2162///
2163/// The `<dd>` element represents the description, definition, or value part of a
2164/// term-description group in a description list (`<dl>`). It provides details for
2165/// the term specified by the preceding `<dt>` element(s).
2166///
2167/// # Content Categories
2168///
2169/// - None (only valid as child of `<dl>` or `<div>` within `<dl>`)
2170///
2171/// # Permitted Content Model
2172///
2173/// - Flow content
2174///
2175/// # Common Use Cases
2176///
2177/// - Definition in a glossary
2178/// - Property value in metadata
2179/// - Answer in FAQ
2180/// - Value in key-value pairs
2181///
2182/// # Key Attributes
2183///
2184/// - Global attributes only
2185///
2186/// # Example
2187///
2188/// ```html
2189/// <dl>
2190///   <dt>HTTP</dt>
2191///   <dd>HyperText Transfer Protocol - the foundation of data
2192///   communication for the World Wide Web.</dd>
2193///   
2194///   <dt>Status</dt>
2195///   <dd>Active</dd>
2196///   
2197///   <dt>Author</dt>
2198///   <dt>Contributor</dt>
2199///   <dd>Jane Smith</dd>
2200///   <dd>John Doe</dd>
2201/// </dl>
2202/// ```
2203///
2204/// # WHATWG Specification
2205///
2206/// - [4.4.11 The dd element](https://html.spec.whatwg.org/multipage/grouping-content.html#the-dd-element)
2207pub struct Dd;
2208impl HtmlElement for Dd {
2209    const TAG: &'static str = "dd";
2210}
2211
2212/// The `<figure>` element - self-contained content.
2213///
2214/// # Purpose
2215///
2216/// The `<figure>` element represents self-contained content, typically with a caption,
2217/// that is referenced as a single unit from the main content. Often used for images,
2218/// diagrams, code listings, or other content that can be moved away from the main flow.
2219///
2220/// # Content Categories
2221///
2222/// - Flow Content
2223/// - Palpable Content
2224///
2225/// # Permitted Content Model
2226///
2227/// - Either: one `<figcaption>` followed by flow content
2228/// - Or: flow content followed by one `<figcaption>`
2229/// - Or: flow content only
2230///
2231/// # Common Use Cases
2232///
2233/// - Images with captions
2234/// - Code examples with descriptions
2235/// - Diagrams or illustrations
2236/// - Quotations with attributions
2237/// - Videos or multimedia with captions
2238///
2239/// # Key Attributes
2240///
2241/// - Global attributes only
2242///
2243/// # Example
2244///
2245/// ```html
2246/// <figure>
2247///   <img src="chart.png" alt="Sales data chart">
2248///   <figcaption>Figure 1: Q4 Sales Performance</figcaption>
2249/// </figure>
2250///
2251/// <figure>
2252///   <pre><code>function greet(name) {
2253///   return `Hello, ${name}!`;
2254/// }</code></pre>
2255///   <figcaption>Example: Template literal usage</figcaption>
2256/// </figure>
2257/// ```
2258///
2259/// # Accessibility
2260///
2261/// - Screen readers associate caption with content
2262/// - Use `<figcaption>` for accessible descriptions
2263///
2264/// # WHATWG Specification
2265///
2266/// - [4.4.12 The figure element](https://html.spec.whatwg.org/multipage/grouping-content.html#the-figure-element)
2267pub struct Figure;
2268impl HtmlElement for Figure {
2269    const TAG: &'static str = "figure";
2270}
2271impl FlowContent for Figure {}
2272impl PalpableContent for Figure {}
2273
2274/// The `<figcaption>` element - figure caption.
2275///
2276/// # Purpose
2277///
2278/// The `<figcaption>` element represents a caption or legend for the content of its
2279/// parent `<figure>` element. It provides a description or title for the figure.
2280///
2281/// # Content Categories
2282///
2283/// - None (only valid as child of `<figure>`)
2284///
2285/// # Permitted Content Model
2286///
2287/// - Flow content
2288///
2289/// # Common Use Cases
2290///
2291/// - Image captions
2292/// - Code example descriptions
2293/// - Chart or diagram titles
2294/// - Table or figure numbering and titles
2295///
2296/// # Key Attributes
2297///
2298/// - Global attributes only
2299///
2300/// # Example
2301///
2302/// ```html
2303/// <figure>
2304///   <img src="mountain.jpg" alt="Mountain landscape">
2305///   <figcaption>
2306///     <strong>Figure 2.1:</strong> The Rocky Mountains at sunset.
2307///     Photo by Jane Photographer.
2308///   </figcaption>
2309/// </figure>
2310///
2311/// <figure>
2312///   <table>
2313///     <tr><th>Year</th><th>Sales</th></tr>
2314///     <tr><td>2023</td><td>$1.2M</td></tr>
2315///   </table>
2316///   <figcaption>Table 1: Annual sales figures</figcaption>
2317/// </figure>
2318/// ```
2319///
2320/// # WHATWG Specification
2321///
2322/// - [4.4.13 The figcaption element](https://html.spec.whatwg.org/multipage/grouping-content.html#the-figcaption-element)
2323pub struct Figcaption;
2324impl HtmlElement for Figcaption {
2325    const TAG: &'static str = "figcaption";
2326}
2327
2328/// The `<search>` element - search functionality.
2329///
2330/// # Purpose
2331///
2332/// The `<search>` element represents a part of a document or application that contains
2333/// form controls or other content related to performing a search or filtering operation.
2334///
2335/// # Content Categories
2336///
2337/// - Flow Content
2338/// - Palpable Content
2339///
2340/// # Permitted Content Model
2341///
2342/// - Flow content
2343///
2344/// # Common Use Cases
2345///
2346/// - Site-wide search forms
2347/// - Filtering interfaces
2348/// - Search functionality within specific sections
2349/// - Product or content search widgets
2350///
2351/// # Key Attributes
2352///
2353/// - Global attributes only
2354///
2355/// # Example
2356///
2357/// ```html
2358/// <search>
2359///   <form action="/search" method="get">
2360///     <label for="query">Search:</label>
2361///     <input type="search" id="query" name="q">
2362///     <button type="submit">Search</button>
2363///   </form>
2364/// </search>
2365///
2366/// <search>
2367///   <h2>Filter Products</h2>
2368///   <label>Price: <input type="range" min="0" max="1000"></label>
2369///   <label>Category: <select>...</select></label>
2370/// </search>
2371/// ```
2372///
2373/// # Accessibility
2374///
2375/// - Provides semantic meaning for search regions
2376/// - Screen readers can identify search landmarks
2377///
2378/// # WHATWG Specification
2379///
2380/// - [4.4.14 The search element](https://html.spec.whatwg.org/multipage/grouping-content.html#the-search-element)
2381pub struct Search;
2382impl HtmlElement for Search {
2383    const TAG: &'static str = "search";
2384}
2385impl FlowContent for Search {}
2386impl PalpableContent for Search {}
2387
2388// =============================================================================
2389// Inline Text Semantics
2390// =============================================================================
2391
2392/// The `<a>` element - hyperlink (anchor).
2393///
2394/// # Purpose
2395///
2396/// The `<a>` element creates a hyperlink to other web pages, files, locations within
2397/// the same page, email addresses, or any other URL. It's one of the most fundamental
2398/// elements of the web, enabling navigation between resources.
2399///
2400/// # Content Categories
2401///
2402/// - Flow Content
2403/// - Phrasing Content
2404/// - Interactive Content (if it has an `href` attribute)
2405/// - Palpable Content
2406///
2407/// # Permitted Content Model
2408///
2409/// - Transparent (inherits from parent), but must not contain interactive content
2410///
2411/// # Common Use Cases
2412///
2413/// - Linking to other pages or websites
2414/// - Creating in-page navigation (anchor links)
2415/// - Downloadable file links
2416/// - Email links (mailto:)
2417/// - Telephone links (tel:)
2418///
2419/// # Key Attributes
2420///
2421/// - `href`: URL or fragment identifier
2422/// - `target`: Browsing context (`"_blank"`, `"_self"`, `"_parent"`, `"_top"`)
2423/// - `rel`: Relationship to linked resource (`"noopener"`, `"noreferrer"`, `"nofollow"`)
2424/// - `download`: Suggests download instead of navigation
2425///
2426/// # Example
2427///
2428/// ```html
2429/// <p>Visit our <a href="https://example.com">website</a> for more information.</p>
2430/// <p><a href="#section2">Jump to Section 2</a></p>
2431/// <p><a href="mailto:info@example.com">Email us</a></p>
2432/// <p><a href="document.pdf" download>Download PDF</a></p>
2433/// <p><a href="https://external.com" target="_blank" rel="noopener">External link</a></p>
2434/// ```
2435///
2436/// # Accessibility
2437///
2438/// - Link text should be descriptive (avoid "click here")
2439/// - Screen readers announce links separately
2440/// - Keyboard accessible by default
2441///
2442/// # WHATWG Specification
2443///
2444/// - [4.5.1 The a element](https://html.spec.whatwg.org/multipage/text-level-semantics.html#the-a-element)
2445pub struct A;
2446impl HtmlElement for A {
2447    const TAG: &'static str = "a";
2448}
2449impl FlowContent for A {}
2450impl PhrasingContent for A {}
2451impl InteractiveContent for A {}
2452impl PalpableContent for A {}
2453
2454/// The `<em>` element - emphasis.
2455///
2456/// # Purpose
2457///
2458/// The `<em>` element represents stress emphasis of its contents. The level of emphasis
2459/// can be increased by nesting `<em>` elements. Typically rendered in italic, but the
2460/// emphasis is semantic, not just visual.
2461///
2462/// # Content Categories
2463///
2464/// - Flow Content
2465/// - Phrasing Content
2466/// - Palpable Content
2467///
2468/// # Permitted Content Model
2469///
2470/// - Phrasing content
2471///
2472/// # Common Use Cases
2473///
2474/// - Emphasizing important words or phrases
2475/// - Changing the meaning based on stress
2476/// - Highlighting key terms in context
2477///
2478/// # Key Attributes
2479///
2480/// - Global attributes only
2481///
2482/// # Example
2483///
2484/// ```html
2485/// <p>I <em>really</em> need to finish this today.</p>
2486/// <p>Cats are <em>cute</em> animals.</p>
2487/// <p>Make sure you <em>do not</em> forget!</p>
2488/// ```
2489///
2490/// # Accessibility
2491///
2492/// - Screen readers may use different voice inflection
2493/// - Conveys semantic emphasis, not just styling
2494///
2495/// # WHATWG Specification
2496///
2497/// - [4.5.2 The em element](https://html.spec.whatwg.org/multipage/text-level-semantics.html#the-em-element)
2498pub struct Em;
2499impl HtmlElement for Em {
2500    const TAG: &'static str = "em";
2501}
2502impl FlowContent for Em {}
2503impl PhrasingContent for Em {}
2504impl PalpableContent for Em {}
2505
2506/// The `<strong>` element - strong importance.
2507///
2508/// # Purpose
2509///
2510/// The `<strong>` element represents strong importance, seriousness, or urgency for its
2511/// contents. Typically rendered in bold, but the semantic meaning is importance, not
2512/// just visual weight.
2513///
2514/// # Content Categories
2515///
2516/// - Flow Content
2517/// - Phrasing Content
2518/// - Palpable Content
2519///
2520/// # Permitted Content Model
2521///
2522/// - Phrasing content
2523///
2524/// # Common Use Cases
2525///
2526/// - Marking critical information or warnings
2527/// - Highlighting important concepts
2528/// - Indicating urgency or seriousness
2529/// - Key terms or takeaways
2530///
2531/// # Key Attributes
2532///
2533/// - Global attributes only
2534///
2535/// # Example
2536///
2537/// ```html
2538/// <p><strong>Warning:</strong> This action cannot be undone.</p>
2539/// <p>The deadline is <strong>tomorrow</strong>.</p>
2540/// <p><strong>Important:</strong> Save your work frequently.</p>
2541/// ```
2542///
2543/// # Accessibility
2544///
2545/// - Screen readers may emphasize strong content
2546/// - Conveys semantic importance
2547///
2548/// # WHATWG Specification
2549///
2550/// - [4.5.3 The strong element](https://html.spec.whatwg.org/multipage/text-level-semantics.html#the-strong-element)
2551pub struct Strong;
2552impl HtmlElement for Strong {
2553    const TAG: &'static str = "strong";
2554}
2555impl FlowContent for Strong {}
2556impl PhrasingContent for Strong {}
2557impl PalpableContent for Strong {}
2558
2559/// The `<small>` element - side comments and small print.
2560///
2561/// # Purpose
2562///
2563/// The `<small>` element represents side comments such as small print, including
2564/// copyright, legal text, disclaimers, caveats, or other fine print. It doesn't
2565/// "de-emphasize" content semantically.
2566///
2567/// # Content Categories
2568///
2569/// - Flow Content
2570/// - Phrasing Content
2571/// - Palpable Content
2572///
2573/// # Permitted Content Model
2574///
2575/// - Phrasing content
2576///
2577/// # Common Use Cases
2578///
2579/// - Copyright notices
2580/// - Legal disclaimers
2581/// - Fine print and caveats
2582/// - License information
2583/// - Attribution text
2584///
2585/// # Key Attributes
2586///
2587/// - Global attributes only
2588///
2589/// # Example
2590///
2591/// ```html
2592/// <footer>
2593///   <p><small>&copy; 2024 My Company. All rights reserved.</small></p>
2594/// </footer>
2595///
2596/// <p>Price: $99.99 <small>(taxes not included)</small></p>
2597/// <p><small>This offer expires on December 31, 2024.</small></p>
2598/// ```
2599///
2600/// # WHATWG Specification
2601///
2602/// - [4.5.4 The small element](https://html.spec.whatwg.org/multipage/text-level-semantics.html#the-small-element)
2603pub struct Small;
2604impl HtmlElement for Small {
2605    const TAG: &'static str = "small";
2606}
2607impl FlowContent for Small {}
2608impl PhrasingContent for Small {}
2609impl PalpableContent for Small {}
2610
2611/// The `<s>` element - strikethrough (no longer accurate).
2612///
2613/// # Purpose
2614///
2615/// The `<s>` element represents contents that are no longer accurate or no longer relevant.
2616/// It's typically rendered with a strikethrough line. Use `<del>` for indicating deletions.
2617///
2618/// # Content Categories
2619///
2620/// - Flow Content
2621/// - Phrasing Content
2622/// - Palpable Content
2623///
2624/// # Permitted Content Model
2625///
2626/// - Phrasing content
2627///
2628/// # Common Use Cases
2629///
2630/// - Showing outdated prices or information
2631/// - Indicating obsolete content
2632/// - Sale prices (showing old price crossed out)
2633/// - Deprecated features or information
2634///
2635/// # Key Attributes
2636///
2637/// - Global attributes only
2638///
2639/// # Example
2640///
2641/// ```html
2642/// <p>Price: <s>$99.99</s> $79.99 (on sale!)</p>
2643/// <p><s>Meeting at 3pm</s> Meeting rescheduled to 4pm</p>
2644/// <p><s>This feature is experimental</s> Now stable and recommended</p>
2645/// ```
2646///
2647/// # WHATWG Specification
2648///
2649/// - [4.5.5 The s element](https://html.spec.whatwg.org/multipage/text-level-semantics.html#the-s-element)
2650pub struct S;
2651impl HtmlElement for S {
2652    const TAG: &'static str = "s";
2653}
2654impl FlowContent for S {}
2655impl PhrasingContent for S {}
2656impl PalpableContent for S {}
2657
2658/// The `<cite>` element - citation or reference to a creative work.
2659///
2660/// # Purpose
2661///
2662/// The `<cite>` element represents a reference to a creative work such as a book, article,
2663/// movie, song, or other cited work. It should contain the title of the work.
2664///
2665/// # Content Categories
2666///
2667/// - Flow Content
2668/// - Phrasing Content
2669/// - Palpable Content
2670///
2671/// # Permitted Content Model
2672///
2673/// - Phrasing content
2674///
2675/// # Common Use Cases
2676///
2677/// - Citing book titles
2678/// - Referencing articles or papers
2679/// - Mentioning movies, songs, or artworks
2680/// - Legal case citations
2681///
2682/// # Key Attributes
2683///
2684/// - Global attributes only
2685///
2686/// # Example
2687///
2688/// ```html
2689/// <p>As described in <cite>The Great Gatsby</cite>, the American Dream...</p>
2690/// <p>According to the research in <cite>Nature</cite> journal...</p>
2691/// <blockquote>
2692///   <p>To be or not to be...</p>
2693///   <footer>— <cite>Hamlet</cite> by William Shakespeare</footer>
2694/// </blockquote>
2695/// ```
2696///
2697/// # WHATWG Specification
2698///
2699/// - [4.5.6 The cite element](https://html.spec.whatwg.org/multipage/text-level-semantics.html#the-cite-element)
2700pub struct Cite;
2701impl HtmlElement for Cite {
2702    const TAG: &'static str = "cite";
2703}
2704impl FlowContent for Cite {}
2705impl PhrasingContent for Cite {}
2706impl PalpableContent for Cite {}
2707
2708/// The `<q>` element - inline quotation.
2709///
2710/// # Purpose
2711///
2712/// The `<q>` element represents a short inline quotation. Browsers typically add
2713/// quotation marks automatically. For longer block quotes, use `<blockquote>`.
2714///
2715/// # Content Categories
2716///
2717/// - Flow Content
2718/// - Phrasing Content
2719/// - Palpable Content
2720///
2721/// # Permitted Content Model
2722///
2723/// - Phrasing content
2724///
2725/// # Common Use Cases
2726///
2727/// - Short inline quotations
2728/// - Quoted phrases within sentences
2729/// - Referenced statements
2730///
2731/// # Key Attributes
2732///
2733/// - `cite`: URL of the source of the quotation
2734/// - Global attributes
2735///
2736/// # Example
2737///
2738/// ```html
2739/// <p>She said, <q>I'll be there at 5pm</q>, and left.</p>
2740/// <p>The motto is <q>Quality over quantity</q>.</p>
2741/// <p>As Einstein said, <q cite="https://example.com">Imagination is more
2742/// important than knowledge</q>.</p>
2743/// ```
2744///
2745/// # WHATWG Specification
2746///
2747/// - [4.5.7 The q element](https://html.spec.whatwg.org/multipage/text-level-semantics.html#the-q-element)
2748pub struct Q;
2749impl HtmlElement for Q {
2750    const TAG: &'static str = "q";
2751}
2752impl FlowContent for Q {}
2753impl PhrasingContent for Q {}
2754impl PalpableContent for Q {}
2755
2756/// The `<dfn>` element - defining instance of a term.
2757///
2758/// # Purpose
2759///
2760/// The `<dfn>` element represents the defining instance of a term. The paragraph,
2761/// description list group, or section that contains the `<dfn>` element should also
2762/// contain the definition of the term.
2763///
2764/// # Content Categories
2765///
2766/// - Flow Content
2767/// - Phrasing Content
2768/// - Palpable Content
2769///
2770/// # Permitted Content Model
2771///
2772/// - Phrasing content (but must not contain another `<dfn>` element)
2773///
2774/// # Common Use Cases
2775///
2776/// - Defining technical terms in glossaries
2777/// - First occurrence of a term being defined
2778/// - Introducing new terminology
2779/// - Academic or technical documentation
2780///
2781/// # Key Attributes
2782///
2783/// - `title`: Full term being defined (if abbreviation is in content)
2784/// - Global attributes
2785///
2786/// # Example
2787///
2788/// ```html
2789/// <p><dfn>HTML</dfn> (HyperText Markup Language) is the standard
2790/// markup language for web pages.</p>
2791///
2792/// <p>A <dfn id="def-widget">widget</dfn> is a small application
2793/// that provides specific functionality.</p>
2794///
2795/// <p><dfn><abbr title="Cascading Style Sheets">CSS</abbr></dfn>
2796/// is used for styling web pages.</p>
2797/// ```
2798///
2799/// # WHATWG Specification
2800///
2801/// - [4.5.8 The dfn element](https://html.spec.whatwg.org/multipage/text-level-semantics.html#the-dfn-element)
2802pub struct Dfn;
2803impl HtmlElement for Dfn {
2804    const TAG: &'static str = "dfn";
2805}
2806impl FlowContent for Dfn {}
2807impl PhrasingContent for Dfn {}
2808impl PalpableContent for Dfn {}
2809
2810/// The `<abbr>` element - abbreviation or acronym.
2811///
2812/// # Purpose
2813///
2814/// The `<abbr>` element represents an abbreviation or acronym. The `title` attribute
2815/// can provide the full expansion of the abbreviation, which is often shown as a
2816/// tooltip on hover.
2817///
2818/// # Content Categories
2819///
2820/// - Flow Content
2821/// - Phrasing Content
2822/// - Palpable Content
2823///
2824/// # Permitted Content Model
2825///
2826/// - Phrasing content
2827///
2828/// # Common Use Cases
2829///
2830/// - Abbreviations (Dr., Inc., etc.)
2831/// - Acronyms (HTML, CSS, API)
2832/// - Shortened terms with full expansions
2833/// - Technical terminology
2834///
2835/// # Key Attributes
2836///
2837/// - `title`: Full expansion or description of the abbreviation
2838/// - Global attributes
2839///
2840/// # Example
2841///
2842/// ```html
2843/// <p>The <abbr title="World Health Organization">WHO</abbr> was founded in 1948.</p>
2844/// <p>Use <abbr title="HyperText Markup Language">HTML</abbr> for structure.</p>
2845/// <p>Contact <abbr title="Doctor">Dr.</abbr> Smith for more information.</p>
2846/// <p>The <abbr title="Application Programming Interface">API</abbr> is RESTful.</p>
2847/// ```
2848///
2849/// # Accessibility
2850///
2851/// - Screen readers may announce the expansion from `title`
2852/// - Helps users understand unfamiliar abbreviations
2853///
2854/// # WHATWG Specification
2855///
2856/// - [4.5.9 The abbr element](https://html.spec.whatwg.org/multipage/text-level-semantics.html#the-abbr-element)
2857pub struct Abbr;
2858impl HtmlElement for Abbr {
2859    const TAG: &'static str = "abbr";
2860}
2861impl FlowContent for Abbr {}
2862impl PhrasingContent for Abbr {}
2863impl PalpableContent for Abbr {}
2864
2865/// The `<ruby>` element - ruby annotation.
2866///
2867/// # Purpose
2868///
2869/// The `<ruby>` element represents a ruby annotation, which is used to show pronunciation
2870/// of East Asian characters. A ruby annotation consists of the base text and ruby text
2871/// (typically pronunciation), often displayed above or beside the base text.
2872///
2873/// # Content Categories
2874///
2875/// - Flow Content
2876/// - Phrasing Content
2877/// - Palpable Content
2878///
2879/// # Permitted Content Model
2880///
2881/// - Phrasing content and `<rt>`, `<rp>` elements
2882///
2883/// # Common Use Cases
2884///
2885/// - Japanese furigana (hiragana pronunciation guides)
2886/// - Chinese pinyin
2887/// - Korean pronunciation guides
2888/// - Pronunciation annotations for any language
2889///
2890/// # Key Attributes
2891///
2892/// - Global attributes only
2893///
2894/// # Example
2895///
2896/// ```html
2897/// <ruby>
2898///   漢<rt>kan</rt>
2899///   字<rt>ji</rt>
2900/// </ruby>
2901///
2902/// <ruby>
2903///   東京<rp>(</rp><rt>とうきょう</rt><rp>)</rp>
2904/// </ruby>
2905/// ```
2906///
2907/// # Accessibility
2908///
2909/// - Screen readers may announce both base and ruby text
2910/// - `<rp>` provides fallback for browsers without ruby support
2911///
2912/// # WHATWG Specification
2913///
2914/// - [4.5.11 The ruby element](https://html.spec.whatwg.org/multipage/text-level-semantics.html#the-ruby-element)
2915pub struct Ruby;
2916impl HtmlElement for Ruby {
2917    const TAG: &'static str = "ruby";
2918}
2919impl FlowContent for Ruby {}
2920impl PhrasingContent for Ruby {}
2921impl PalpableContent for Ruby {}
2922
2923/// The `<rt>` element - ruby text component.
2924///
2925/// # Purpose
2926///
2927/// The `<rt>` element contains the ruby text component of a ruby annotation,
2928/// providing pronunciation or translation information for the base text in a
2929/// `<ruby>` element.
2930///
2931/// # Content Categories
2932///
2933/// - None (only valid as child of `<ruby>`)
2934///
2935/// # Permitted Content Model
2936///
2937/// - Phrasing content
2938///
2939/// # Common Use Cases
2940///
2941/// - Pronunciation guides (furigana, pinyin)
2942/// - Translation or meaning annotations
2943/// - Phonetic transcriptions
2944///
2945/// # Key Attributes
2946///
2947/// - Global attributes only
2948///
2949/// # Example
2950///
2951/// ```html
2952/// <ruby>日本<rt>にほん</rt></ruby>
2953/// <ruby>北京<rt>Běijīng</rt></ruby>
2954/// ```
2955///
2956/// # WHATWG Specification
2957///
2958/// - [4.5.12 The rt element](https://html.spec.whatwg.org/multipage/text-level-semantics.html#the-rt-element)
2959pub struct Rt;
2960impl HtmlElement for Rt {
2961    const TAG: &'static str = "rt";
2962}
2963
2964/// The `<rp>` element - ruby fallback parenthesis.
2965///
2966/// # Purpose
2967///
2968/// The `<rp>` element provides parentheses or other characters to be displayed
2969/// by browsers that don't support ruby annotations. It's used to wrap ruby text
2970/// in fallback scenarios.
2971///
2972/// # Content Categories
2973///
2974/// - None (only valid as child of `<ruby>`)
2975///
2976/// # Permitted Content Model
2977///
2978/// - Text (typically parentheses)
2979///
2980/// # Common Use Cases
2981///
2982/// - Fallback parentheses for ruby annotations
2983/// - Ensuring ruby text is distinguishable in non-supporting browsers
2984///
2985/// # Key Attributes
2986///
2987/// - Global attributes only
2988///
2989/// # Example
2990///
2991/// ```html
2992/// <ruby>
2993///   漢字<rp>(</rp><rt>かんじ</rt><rp>)</rp>
2994/// </ruby>
2995/// <!-- Browsers without ruby support show: 漢字(かんじ) -->
2996/// <!-- Browsers with ruby support show annotation without parentheses -->
2997/// ```
2998///
2999/// # WHATWG Specification
3000///
3001/// - [4.5.13 The rp element](https://html.spec.whatwg.org/multipage/text-level-semantics.html#the-rp-element)
3002pub struct Rp;
3003impl HtmlElement for Rp {
3004    const TAG: &'static str = "rp";
3005}
3006
3007/// The `<data>` element - machine-readable data.
3008///
3009/// # Purpose
3010///
3011/// The `<data>` element links content to a machine-readable translation via the `value`
3012/// attribute. It associates human-readable content with a machine-readable equivalent,
3013/// useful for data processing, sorting, or semantic web applications.
3014///
3015/// # Content Categories
3016///
3017/// - Flow Content
3018/// - Phrasing Content
3019/// - Palpable Content
3020///
3021/// # Permitted Content Model
3022///
3023/// - Phrasing content
3024///
3025/// # Common Use Cases
3026///
3027/// - Product identifiers (SKUs, UPCs)
3028/// - Numeric data with formatted display
3029/// - Sortable values with custom display
3030/// - Machine-readable metadata
3031///
3032/// # Key Attributes
3033///
3034/// - `value`: Machine-readable value (required)
3035/// - Global attributes
3036///
3037/// # Example
3038///
3039/// ```html
3040/// <p>Product: <data value="SKU-12345">Widget Pro</data></p>
3041/// <p>Price: <data value="39.99">$39.99 USD</data></p>
3042/// <ul>
3043///   <li><data value="8">Eight</data> items</li>
3044///   <li><data value="21">Twenty-one</data> items</li>
3045/// </ul>
3046/// ```
3047///
3048/// # WHATWG Specification
3049///
3050/// - [4.5.14 The data element](https://html.spec.whatwg.org/multipage/text-level-semantics.html#the-data-element)
3051pub struct Data;
3052impl HtmlElement for Data {
3053    const TAG: &'static str = "data";
3054}
3055impl FlowContent for Data {}
3056impl PhrasingContent for Data {}
3057impl PalpableContent for Data {}
3058
3059/// The `<time>` element - date and/or time.
3060///
3061/// # Purpose
3062///
3063/// The `<time>` element represents a specific time or date, optionally with a
3064/// machine-readable timestamp in the `datetime` attribute. It helps search engines
3065/// and other software understand temporal information.
3066///
3067/// # Content Categories
3068///
3069/// - Flow Content
3070/// - Phrasing Content
3071/// - Palpable Content
3072///
3073/// # Permitted Content Model
3074///
3075/// - Phrasing content (but no `<time>` descendants)
3076///
3077/// # Common Use Cases
3078///
3079/// - Publication dates
3080/// - Event dates and times
3081/// - Deadlines and schedules
3082/// - Historical dates
3083/// - Time-based content
3084///
3085/// # Key Attributes
3086///
3087/// - `datetime`: Machine-readable date/time (ISO 8601 format)
3088/// - Global attributes
3089///
3090/// # Example
3091///
3092/// ```html
3093/// <p>Posted on <time datetime="2024-01-15">January 15, 2024</time></p>
3094/// <p>Event starts at <time datetime="2024-06-20T19:00">7:00 PM on June 20</time></p>
3095/// <p>Updated <time datetime="2024-01-15T14:30:00Z">today at 2:30 PM</time></p>
3096/// <time datetime="2024">2024</time>
3097/// ```
3098///
3099/// # Accessibility
3100///
3101/// - Provides semantic meaning for dates and times
3102/// - `datetime` attribute aids machine parsing
3103///
3104/// # WHATWG Specification
3105///
3106/// - [4.5.15 The time element](https://html.spec.whatwg.org/multipage/text-level-semantics.html#the-time-element)
3107pub struct Time;
3108impl HtmlElement for Time {
3109    const TAG: &'static str = "time";
3110}
3111impl FlowContent for Time {}
3112impl PhrasingContent for Time {}
3113impl PalpableContent for Time {}
3114
3115/// The `<code>` element - code fragment.
3116///
3117/// # Purpose
3118///
3119/// The `<code>` element represents a fragment of computer code. It can be an inline code
3120/// snippet within text or used within `<pre>` for code blocks. Typically displayed in
3121/// a monospace font.
3122///
3123/// # Content Categories
3124///
3125/// - Flow Content
3126/// - Phrasing Content
3127/// - Palpable Content
3128///
3129/// # Permitted Content Model
3130///
3131/// - Phrasing content
3132///
3133/// # Common Use Cases
3134///
3135/// - Inline code references in documentation
3136/// - Code blocks (with `<pre>`)
3137/// - Function or variable names in text
3138/// - HTML/CSS/JavaScript snippets
3139/// - Programming examples
3140///
3141/// # Key Attributes
3142///
3143/// - Global attributes only
3144///
3145/// # Example
3146///
3147/// ```html
3148/// <p>Use the <code>console.log()</code> function for debugging.</p>
3149/// <p>The <code>&lt;div&gt;</code> element is a container.</p>
3150/// <pre><code>function greet(name) {
3151///   return `Hello, ${name}!`;
3152/// }</code></pre>
3153/// ```
3154///
3155/// # WHATWG Specification
3156///
3157/// - [4.5.16 The code element](https://html.spec.whatwg.org/multipage/text-level-semantics.html#the-code-element)
3158pub struct Code;
3159impl HtmlElement for Code {
3160    const TAG: &'static str = "code";
3161}
3162impl FlowContent for Code {}
3163impl PhrasingContent for Code {}
3164impl PalpableContent for Code {}
3165
3166/// The `<var>` element - variable or placeholder.
3167///
3168/// # Purpose
3169///
3170/// The `<var>` element represents a variable in a mathematical expression, programming
3171/// context, or a placeholder where the user should substitute their own value.
3172///
3173/// # Content Categories
3174///
3175/// - Flow Content
3176/// - Phrasing Content
3177/// - Palpable Content
3178///
3179/// # Permitted Content Model
3180///
3181/// - Phrasing content
3182///
3183/// # Common Use Cases
3184///
3185/// - Variables in mathematical equations
3186/// - Programming variable names
3187/// - Placeholder values in documentation
3188/// - Parameters in formulas or functions
3189///
3190/// # Key Attributes
3191///
3192/// - Global attributes only
3193///
3194/// # Example
3195///
3196/// ```html
3197/// <p>The area of a rectangle is <var>width</var> × <var>height</var>.</p>
3198/// <p>Set <var>username</var> to your account name.</p>
3199/// <p>The function signature is <code>greet(<var>name</var>)</code>.</p>
3200/// ```
3201///
3202/// # WHATWG Specification
3203///
3204/// - [4.5.17 The var element](https://html.spec.whatwg.org/multipage/text-level-semantics.html#the-var-element)
3205pub struct Var;
3206impl HtmlElement for Var {
3207    const TAG: &'static str = "var";
3208}
3209impl FlowContent for Var {}
3210impl PhrasingContent for Var {}
3211impl PalpableContent for Var {}
3212
3213/// The `<samp>` element - sample output.
3214///
3215/// # Purpose
3216///
3217/// The `<samp>` element represents sample or quoted output from a computer program,
3218/// script, or system. It's used to show what a program or system would display.
3219///
3220/// # Content Categories
3221///
3222/// - Flow Content
3223/// - Phrasing Content
3224/// - Palpable Content
3225///
3226/// # Permitted Content Model
3227///
3228/// - Phrasing content
3229///
3230/// # Common Use Cases
3231///
3232/// - Command-line output
3233/// - Error messages
3234/// - System responses
3235/// - Program execution results
3236/// - Log file excerpts
3237///
3238/// # Key Attributes
3239///
3240/// - Global attributes only
3241///
3242/// # Example
3243///
3244/// ```html
3245/// <p>The program outputs: <samp>Hello, World!</samp></p>
3246/// <p>Error message: <samp>File not found</samp></p>
3247/// <pre><samp>$ node app.js
3248/// Server listening on port 3000</samp></pre>
3249/// ```
3250///
3251/// # WHATWG Specification
3252///
3253/// - [4.5.18 The samp element](https://html.spec.whatwg.org/multipage/text-level-semantics.html#the-samp-element)
3254pub struct Samp;
3255impl HtmlElement for Samp {
3256    const TAG: &'static str = "samp";
3257}
3258impl FlowContent for Samp {}
3259impl PhrasingContent for Samp {}
3260impl PalpableContent for Samp {}
3261
3262/// The `<kbd>` element - keyboard input.
3263///
3264/// # Purpose
3265///
3266/// The `<kbd>` element represents user input from a keyboard, voice input, or any other
3267/// text entry device. It's used to indicate keys, key combinations, or commands that
3268/// users should enter.
3269///
3270/// # Content Categories
3271///
3272/// - Flow Content
3273/// - Phrasing Content
3274/// - Palpable Content
3275///
3276/// # Permitted Content Model
3277///
3278/// - Phrasing content
3279///
3280/// # Common Use Cases
3281///
3282/// - Keyboard shortcuts
3283/// - Keys to press
3284/// - Command-line commands user should type
3285/// - Menu selections or button presses
3286///
3287/// # Key Attributes
3288///
3289/// - Global attributes only
3290///
3291/// # Example
3292///
3293/// ```html
3294/// <p>Press <kbd>Ctrl</kbd>+<kbd>C</kbd> to copy.</p>
3295/// <p>Save the file with <kbd>Ctrl</kbd>+<kbd>S</kbd>.</p>
3296/// <p>To quit, type <kbd>exit</kbd> and press <kbd>Enter</kbd>.</p>
3297/// <p>Use <kbd><kbd>Ctrl</kbd>+<kbd>Alt</kbd>+<kbd>Delete</kbd></kbd> to restart.</p>
3298/// ```
3299///
3300/// # Accessibility
3301///
3302/// - Screen readers may announce keyboard input distinctly
3303/// - Helps users identify actionable keyboard commands
3304///
3305/// # WHATWG Specification
3306///
3307/// - [4.5.19 The kbd element](https://html.spec.whatwg.org/multipage/text-level-semantics.html#the-kbd-element)
3308pub struct Kbd;
3309impl HtmlElement for Kbd {
3310    const TAG: &'static str = "kbd";
3311}
3312impl FlowContent for Kbd {}
3313impl PhrasingContent for Kbd {}
3314impl PalpableContent for Kbd {}
3315
3316/// The `<sub>` element - subscript.
3317///
3318/// # Purpose
3319///
3320/// The `<sub>` element represents subscript text, which appears half a character below
3321/// the normal line and is often rendered in a smaller font. Used for mathematical,
3322/// chemical, or typographical notations.
3323///
3324/// # Content Categories
3325///
3326/// - Flow Content
3327/// - Phrasing Content
3328/// - Palpable Content
3329///
3330/// # Permitted Content Model
3331///
3332/// - Phrasing content
3333///
3334/// # Common Use Cases
3335///
3336/// - Chemical formulas (H₂O)
3337/// - Mathematical subscripts (xᵢ, aₙ)
3338/// - Footnote references
3339/// - Typographic conventions
3340///
3341/// # Key Attributes
3342///
3343/// - Global attributes only
3344///
3345/// # Example
3346///
3347/// ```html
3348/// <p>The chemical formula for water is H<sub>2</sub>O.</p>
3349/// <p>The variable x<sub>i</sub> represents the i-th element.</p>
3350/// <p>CO<sub>2</sub> emissions have increased.</p>
3351/// ```
3352///
3353/// # WHATWG Specification
3354///
3355/// - [4.5.20 The sub element](https://html.spec.whatwg.org/multipage/text-level-semantics.html#the-sub-and-sup-elements)
3356pub struct Sub;
3357impl HtmlElement for Sub {
3358    const TAG: &'static str = "sub";
3359}
3360impl FlowContent for Sub {}
3361impl PhrasingContent for Sub {}
3362impl PalpableContent for Sub {}
3363
3364/// The `<sup>` element - superscript.
3365///
3366/// # Purpose
3367///
3368/// The `<sup>` element represents superscript text, which appears half a character above
3369/// the normal line and is often rendered in a smaller font. Used for exponents, ordinal
3370/// indicators, and footnote markers.
3371///
3372/// # Content Categories
3373///
3374/// - Flow Content
3375/// - Phrasing Content
3376/// - Palpable Content
3377///
3378/// # Permitted Content Model
3379///
3380/// - Phrasing content
3381///
3382/// # Common Use Cases
3383///
3384/// - Mathematical exponents (x², 10³)
3385/// - Ordinal indicators (1st, 2nd, 3rd)
3386/// - Footnote or reference markers
3387/// - Trademark symbols (™, ®)
3388///
3389/// # Key Attributes
3390///
3391/// - Global attributes only
3392///
3393/// # Example
3394///
3395/// ```html
3396/// <p>Einstein's equation: E = mc<sup>2</sup></p>
3397/// <p>Area of a square: side<sup>2</sup></p>
3398/// <p>On the 21<sup>st</sup> of March...</p>
3399/// <p>Copyright<sup>&copy;</sup> 2024</p>
3400/// ```
3401///
3402/// # WHATWG Specification
3403///
3404/// - [4.5.20 The sup element](https://html.spec.whatwg.org/multipage/text-level-semantics.html#the-sub-and-sup-elements)
3405pub struct Sup;
3406impl HtmlElement for Sup {
3407    const TAG: &'static str = "sup";
3408}
3409impl FlowContent for Sup {}
3410impl PhrasingContent for Sup {}
3411impl PalpableContent for Sup {}
3412
3413/// The `<i>` element - idiomatic text.
3414///
3415/// # Purpose
3416///
3417/// The `<i>` element represents text in an alternate voice or mood, or otherwise offset
3418/// from normal prose. Examples include taxonomic designations, technical terms, foreign
3419/// phrases, thoughts, or ship names. Not for emphasis—use `<em>` for that.
3420///
3421/// # Content Categories
3422///
3423/// - Flow Content
3424/// - Phrasing Content
3425/// - Palpable Content
3426///
3427/// # Permitted Content Model
3428///
3429/// - Phrasing content
3430///
3431/// # Common Use Cases
3432///
3433/// - Foreign language phrases
3434/// - Technical or taxonomic terms
3435/// - Thoughts or internal dialogue
3436/// - Ship or vessel names
3437/// - Idiomatic expressions
3438///
3439/// # Key Attributes
3440///
3441/// - Global attributes only
3442///
3443/// # Example
3444///
3445/// ```html
3446/// <p>The term <i>café</i> comes from French.</p>
3447/// <p>The species <i>Homo sapiens</i> evolved in Africa.</p>
3448/// <p><i>I wonder what she meant,</i> he thought.</p>
3449/// <p>The <i>HMS Victory</i> was Nelson's flagship.</p>
3450/// ```
3451///
3452/// # WHATWG Specification
3453///
3454/// - [4.5.21 The i element](https://html.spec.whatwg.org/multipage/text-level-semantics.html#the-i-element)
3455pub struct I;
3456impl HtmlElement for I {
3457    const TAG: &'static str = "i";
3458}
3459impl FlowContent for I {}
3460impl PhrasingContent for I {}
3461impl PalpableContent for I {}
3462
3463/// The `<b>` element - bring attention to.
3464///
3465/// # Purpose
3466///
3467/// The `<b>` element draws attention to content without conveying extra importance,
3468/// seriousness, or emphasis. Used for keywords, product names, or other spans of text
3469/// whose typical presentation is bold. Not for emphasis—use `<strong>` for that.
3470///
3471/// # Content Categories
3472///
3473/// - Flow Content
3474/// - Phrasing Content
3475/// - Palpable Content
3476///
3477/// # Permitted Content Model
3478///
3479/// - Phrasing content
3480///
3481/// # Common Use Cases
3482///
3483/// - Keywords in a document
3484/// - Product names in reviews
3485/// - Lead-in words or phrases
3486/// - Drawing attention without semantic importance
3487///
3488/// # Key Attributes
3489///
3490/// - Global attributes only
3491///
3492/// # Example
3493///
3494/// ```html
3495/// <p><b>Note:</b> This feature is experimental.</p>
3496/// <p>The <b>iPhone 15</b> was released in September 2023.</p>
3497/// <p><b>Ingredients:</b> flour, sugar, eggs, butter.</p>
3498/// ```
3499///
3500/// # WHATWG Specification
3501///
3502/// - [4.5.22 The b element](https://html.spec.whatwg.org/multipage/text-level-semantics.html#the-b-element)
3503pub struct B;
3504impl HtmlElement for B {
3505    const TAG: &'static str = "b";
3506}
3507impl FlowContent for B {}
3508impl PhrasingContent for B {}
3509impl PalpableContent for B {}
3510
3511/// The `<u>` element - unarticulated annotation.
3512///
3513/// # Purpose
3514///
3515/// The `<u>` element represents a span of text with an unarticulated, though explicitly
3516/// rendered, non-textual annotation. Examples include labeling text as misspelled (like
3517/// spell-checker red underlines) or marking proper names in Chinese text.
3518///
3519/// # Content Categories
3520///
3521/// - Flow Content
3522/// - Phrasing Content
3523/// - Palpable Content
3524///
3525/// # Permitted Content Model
3526///
3527/// - Phrasing content
3528///
3529/// # Common Use Cases
3530///
3531/// - Spelling errors in user input
3532/// - Proper names in Chinese text
3533/// - Unarticulated annotations
3534/// - Text requiring non-textual annotation
3535///
3536/// # Key Attributes
3537///
3538/// - Global attributes only
3539///
3540/// # Example
3541///
3542/// ```html
3543/// <p>The word <u>recieve</u> is misspelled.</p>
3544/// <p>User wrote: <u>definately</u> (marked as misspelled)</p>
3545/// ```
3546///
3547/// # WHATWG Specification
3548///
3549/// - [4.5.23 The u element](https://html.spec.whatwg.org/multipage/text-level-semantics.html#the-u-element)
3550pub struct U;
3551impl HtmlElement for U {
3552    const TAG: &'static str = "u";
3553}
3554impl FlowContent for U {}
3555impl PhrasingContent for U {}
3556impl PalpableContent for U {}
3557
3558/// The `<mark>` element - highlighted or marked text.
3559///
3560/// # Purpose
3561///
3562/// The `<mark>` element represents text that is marked or highlighted for reference or
3563/// notation purposes, due to its relevance in the surrounding context. Think of it as
3564/// a highlighter pen marking in a document.
3565///
3566/// # Content Categories
3567///
3568/// - Flow Content
3569/// - Phrasing Content
3570/// - Palpable Content
3571///
3572/// # Permitted Content Model
3573///
3574/// - Phrasing content
3575///
3576/// # Common Use Cases
3577///
3578/// - Search result highlighting
3579/// - Important passages or quotes
3580/// - Code or text being referenced
3581/// - Changes or updates in reviewed documents
3582/// - Key parts of quoted text
3583///
3584/// # Key Attributes
3585///
3586/// - Global attributes only
3587///
3588/// # Example
3589///
3590/// ```html
3591/// <p>Search results for "HTML": The <mark>HTML</mark> specification defines...</p>
3592/// <p>Most important: <mark>Always save your work!</mark></p>
3593/// <blockquote>
3594///   Four score and seven years ago, <mark>our fathers brought forth</mark>...
3595/// </blockquote>
3596/// ```
3597///
3598/// # Accessibility
3599///
3600/// - Screen readers may announce marked content
3601/// - Typically rendered with yellow background
3602///
3603/// # WHATWG Specification
3604///
3605/// - [4.5.24 The mark element](https://html.spec.whatwg.org/multipage/text-level-semantics.html#the-mark-element)
3606pub struct Mark;
3607impl HtmlElement for Mark {
3608    const TAG: &'static str = "mark";
3609}
3610impl FlowContent for Mark {}
3611impl PhrasingContent for Mark {}
3612impl PalpableContent for Mark {}
3613
3614/// The `<bdi>` element - bidirectional isolate.
3615///
3616/// # Purpose
3617///
3618/// The `<bdi>` element isolates a span of text that might be formatted in a different
3619/// direction from other text around it. It's used when embedding user-generated content
3620/// or database values where the text direction is unknown.
3621///
3622/// # Content Categories
3623///
3624/// - Flow Content
3625/// - Phrasing Content
3626/// - Palpable Content
3627///
3628/// # Permitted Content Model
3629///
3630/// - Phrasing content
3631///
3632/// # Common Use Cases
3633///
3634/// - User-generated content (usernames, comments)
3635/// - Database values with unknown text direction
3636/// - Mixing left-to-right and right-to-left text
3637/// - Product names or IDs that may contain RTL characters
3638///
3639/// # Key Attributes
3640///
3641/// - Global attributes only (particularly `dir`)
3642///
3643/// # Example
3644///
3645/// ```html
3646/// <p>User <bdi>إيان</bdi> posted: "Hello world"</p>
3647/// <ul>
3648///   <li>User <bdi>jdoe</bdi>: 60 points</li>
3649///   <li>User <bdi>مستخدم123</bdi>: 50 points</li>
3650/// </ul>
3651/// ```
3652///
3653/// # Accessibility
3654///
3655/// - Prevents text direction issues in screen readers
3656/// - Maintains correct reading order
3657///
3658/// # WHATWG Specification
3659///
3660/// - [4.5.25 The bdi element](https://html.spec.whatwg.org/multipage/text-level-semantics.html#the-bdi-element)
3661pub struct Bdi;
3662impl HtmlElement for Bdi {
3663    const TAG: &'static str = "bdi";
3664}
3665impl FlowContent for Bdi {}
3666impl PhrasingContent for Bdi {}
3667impl PalpableContent for Bdi {}
3668
3669/// The `<bdo>` element - bidirectional text override.
3670///
3671/// # Purpose
3672///
3673/// The `<bdo>` element overrides the current directionality of text, forcing the text
3674/// within it to be rendered in a specific direction regardless of the Unicode bidirectional
3675/// algorithm. Requires the `dir` attribute.
3676///
3677/// # Content Categories
3678///
3679/// - Flow Content
3680/// - Phrasing Content
3681/// - Palpable Content
3682///
3683/// # Permitted Content Model
3684///
3685/// - Phrasing content
3686///
3687/// # Common Use Cases
3688///
3689/// - Forcing specific text direction for demonstration
3690/// - Displaying text in reverse for special effects
3691/// - Overriding automatic text direction detection
3692///
3693/// # Key Attributes
3694///
3695/// - `dir`: Text direction—`"ltr"` (left-to-right) or `"rtl"` (right-to-left) (required)
3696/// - Global attributes
3697///
3698/// # Example
3699///
3700/// ```html
3701/// <p>This text contains <bdo dir="rtl">reversed text</bdo> in the middle.</p>
3702/// <p><bdo dir="ltr">This is forced left-to-right</bdo></p>
3703/// ```
3704///
3705/// # WHATWG Specification
3706///
3707/// - [4.5.26 The bdo element](https://html.spec.whatwg.org/multipage/text-level-semantics.html#the-bdo-element)
3708pub struct Bdo;
3709impl HtmlElement for Bdo {
3710    const TAG: &'static str = "bdo";
3711}
3712impl FlowContent for Bdo {}
3713impl PhrasingContent for Bdo {}
3714impl PalpableContent for Bdo {}
3715
3716/// The `<span>` element - generic inline container.
3717///
3718/// # Purpose
3719///
3720/// The `<span>` element is a generic inline container for phrasing content. It has no
3721/// semantic meaning and should be used only when no other semantic element is appropriate.
3722/// Primarily used for styling with CSS or as a target for JavaScript.
3723///
3724/// # Content Categories
3725///
3726/// - Flow Content
3727/// - Phrasing Content
3728/// - Palpable Content (if it has content)
3729///
3730/// # Permitted Content Model
3731///
3732/// - Phrasing content
3733///
3734/// # Common Use Cases
3735///
3736/// - Styling parts of text with CSS
3737/// - JavaScript manipulation targets
3738/// - Applying classes or IDs to inline content
3739/// - Wrapping inline content when no semantic element fits
3740///
3741/// # Key Attributes
3742///
3743/// - Global attributes only (commonly `class`, `id`, `style`)
3744///
3745/// # Example
3746///
3747/// ```html
3748/// <p>The price is <span class="price">$29.99</span></p>
3749/// <p>Status: <span class="status-active">Active</span></p>
3750/// <p>Call us at <span id="phone-number">555-1234</span></p>
3751/// ```
3752///
3753/// # WHATWG Specification
3754///
3755/// - [4.5.27 The span element](https://html.spec.whatwg.org/multipage/text-level-semantics.html#the-span-element)
3756pub struct Span;
3757impl HtmlElement for Span {
3758    const TAG: &'static str = "span";
3759}
3760impl FlowContent for Span {}
3761impl PhrasingContent for Span {}
3762impl PalpableContent for Span {}
3763
3764/// The `<br>` element - line break.
3765///
3766/// # Purpose
3767///
3768/// The `<br>` element produces a line break in text. It's useful for situations where
3769/// line breaks are part of the content (poems, addresses) but should not be used for
3770/// spacing or layout—use CSS for that.
3771///
3772/// # Content Categories
3773///
3774/// - Flow Content
3775/// - Phrasing Content
3776///
3777/// # Permitted Content Model
3778///
3779/// - None (void element)
3780///
3781/// # Common Use Cases
3782///
3783/// - Line breaks in poems or verses
3784/// - Address formatting
3785/// - Breaking lines in signatures
3786/// - Line breaks that are part of content semantics
3787///
3788/// # Key Attributes
3789///
3790/// - Global attributes only (rarely used)
3791///
3792/// # Example
3793///
3794/// ```html
3795/// <p>
3796///   Roses are red,<br>
3797///   Violets are blue,<br>
3798///   HTML is great,<br>
3799///   And CSS too!
3800/// </p>
3801///
3802/// <address>
3803///   123 Main Street<br>
3804///   Anytown, CA 12345<br>
3805///   USA
3806/// </address>
3807/// ```
3808///
3809/// # WHATWG Specification
3810///
3811/// - [4.5.28 The br element](https://html.spec.whatwg.org/multipage/text-level-semantics.html#the-br-element)
3812pub struct Br;
3813impl HtmlElement for Br {
3814    const TAG: &'static str = "br";
3815    const VOID: bool = true;
3816}
3817impl FlowContent for Br {}
3818impl PhrasingContent for Br {}
3819
3820/// The `<wbr>` element - word break opportunity.
3821///
3822/// # Purpose
3823///
3824/// The `<wbr>` element represents a position within text where the browser may optionally
3825/// break a line, though its line-breaking rules would not otherwise create a break at that
3826/// position. Useful for long words or URLs.
3827///
3828/// # Content Categories
3829///
3830/// - Flow Content
3831/// - Phrasing Content
3832///
3833/// # Permitted Content Model
3834///
3835/// - None (void element)
3836///
3837/// # Common Use Cases
3838///
3839/// - Long URLs or file paths
3840/// - Compound words or technical terms
3841/// - Long strings without natural break points
3842/// - Email addresses
3843///
3844/// # Key Attributes
3845///
3846/// - Global attributes only
3847///
3848/// # Example
3849///
3850/// ```html
3851/// <p>Visit http://this<wbr>.is<wbr>.a<wbr>.really<wbr>.long<wbr>.example<wbr>.com/</p>
3852/// <p>Pneumono<wbr>ultra<wbr>microscopic<wbr>silico<wbr>volcano<wbr>coniosis</p>
3853/// <p>Email: super<wbr>long<wbr>username<wbr>@<wbr>example.com</p>
3854/// ```
3855///
3856/// # WHATWG Specification
3857///
3858/// - [4.5.29 The wbr element](https://html.spec.whatwg.org/multipage/text-level-semantics.html#the-wbr-element)
3859pub struct Wbr;
3860impl HtmlElement for Wbr {
3861    const TAG: &'static str = "wbr";
3862    const VOID: bool = true;
3863}
3864impl FlowContent for Wbr {}
3865impl PhrasingContent for Wbr {}
3866
3867// =============================================================================
3868// Image and Multimedia
3869// =============================================================================
3870
3871/// The `<img>` element - embeds an image into the document.
3872///
3873/// # Purpose
3874///
3875/// The `<img>` element represents an image and its fallback text. It is used to embed
3876/// graphics, photographs, illustrations, diagrams, and other visual content into web pages.
3877/// Images are loaded asynchronously and become part of the document flow.
3878///
3879/// # Content Categories
3880///
3881/// - Flow Content
3882/// - Phrasing Content
3883/// - Embedded Content
3884/// - Palpable Content
3885/// - If with `usemap` attribute: Interactive Content
3886///
3887/// # Permitted Content Model
3888///
3889/// - None (void element)
3890///
3891/// # Common Use Cases
3892///
3893/// - Displaying photographs and illustrations
3894/// - Showing logos and branding elements
3895/// - Embedding diagrams and infographics
3896/// - Creating image-based navigation elements
3897/// - Displaying user avatars and profile pictures
3898///
3899/// # Key Attributes
3900///
3901/// - `src`: URL of the image (required)
3902/// - `alt`: Alternative text description (required for accessibility)
3903/// - `width`: Intrinsic width in pixels
3904/// - `height`: Intrinsic height in pixels
3905/// - `loading`: Lazy loading behavior ("lazy" or "eager")
3906/// - `decoding`: Image decoding hint ("sync", "async", or "auto")
3907/// - `srcset`: Responsive image sources for different resolutions
3908/// - `sizes`: Media conditions for responsive images
3909/// - `crossorigin`: CORS settings for image fetching
3910/// - `usemap`: Associates image with a `<map>` element
3911/// - `ismap`: Indicates server-side image map
3912/// - `referrerpolicy`: Referrer policy for image requests
3913/// - `fetchpriority`: Hint for relative fetch priority
3914///
3915/// # Example
3916///
3917/// ```html
3918/// <!-- Basic image -->
3919/// <img src="/images/logo.png" alt="Company Logo" width="200" height="100">
3920///
3921/// <!-- Responsive image with srcset -->
3922/// <img src="/images/photo.jpg"
3923///      srcset="/images/photo-320w.jpg 320w,
3924///              /images/photo-640w.jpg 640w,
3925///              /images/photo-1024w.jpg 1024w"
3926///      sizes="(max-width: 320px) 280px,
3927///             (max-width: 640px) 600px,
3928///             1000px"
3929///      alt="Scenic landscape photograph">
3930///
3931/// <!-- Lazy-loaded image -->
3932/// <img src="/images/hero.jpg" alt="Hero banner" loading="lazy">
3933///
3934/// <!-- Image with decorative purpose -->
3935/// <img src="/images/decorative-divider.png" alt="" role="presentation">
3936/// ```
3937///
3938/// # Accessibility
3939///
3940/// - Always provide meaningful `alt` text describing the image content
3941/// - Use empty `alt=""` for decorative images
3942/// - Ensure alt text is concise yet descriptive (typically under 150 characters)
3943/// - Don't use phrases like "image of" or "picture of" in alt text
3944/// - For complex images (charts, diagrams), consider using `<figure>` with `<figcaption>`
3945/// - Ensure sufficient color contrast for images containing text
3946/// - Provide text alternatives for informational images
3947///
3948/// # WHATWG Specification
3949///
3950/// - [4.8.3 The img element](https://html.spec.whatwg.org/multipage/embedded-content.html#the-img-element)
3951pub struct Img;
3952impl HtmlElement for Img {
3953    const TAG: &'static str = "img";
3954    const VOID: bool = true;
3955}
3956impl FlowContent for Img {}
3957impl PhrasingContent for Img {}
3958impl EmbeddedContent for Img {}
3959impl PalpableContent for Img {}
3960
3961/// The `<picture>` element - contains multiple image sources for responsive images.
3962///
3963/// # Purpose
3964///
3965/// The `<picture>` element provides a container for zero or more `<source>` elements and one
3966/// `<img>` element to offer alternative versions of an image for different display/device
3967/// scenarios. It enables art direction and format-based image selection, going beyond simple
3968/// resolution switching.
3969///
3970/// # Content Categories
3971///
3972/// - Flow Content
3973/// - Phrasing Content
3974/// - Embedded Content
3975/// - Palpable Content
3976///
3977/// # Permitted Content Model
3978///
3979/// - Zero or more `<source>` elements
3980/// - Followed by one `<img>` element
3981/// - Optionally intermixed with script-supporting elements
3982///
3983/// # Common Use Cases
3984///
3985/// - Art direction (different crops or compositions for different viewport sizes)
3986/// - Serving modern image formats with fallbacks (WebP, AVIF with JPEG fallback)
3987/// - Resolution switching based on device pixel ratio
3988/// - Bandwidth optimization by serving different image sizes
3989/// - Responsive design with different aspect ratios
3990///
3991/// # Key Attributes
3992///
3993/// - Global attributes only (attributes are primarily on child `<source>` and `<img>` elements)
3994///
3995/// # Example
3996///
3997/// ```html
3998/// <!-- Art direction: different images for different viewport sizes -->
3999/// <picture>
4000///   <source media="(min-width: 1024px)" srcset="/images/hero-wide.jpg">
4001///   <source media="(min-width: 768px)" srcset="/images/hero-medium.jpg">
4002///   <img src="/images/hero-narrow.jpg" alt="Hero image">
4003/// </picture>
4004///
4005/// <!-- Format selection: modern formats with fallback -->
4006/// <picture>
4007///   <source srcset="/images/photo.avif" type="image/avif">
4008///   <source srcset="/images/photo.webp" type="image/webp">
4009///   <img src="/images/photo.jpg" alt="Photograph">
4010/// </picture>
4011///
4012/// <!-- Combining media queries and formats -->
4013/// <picture>
4014///   <source media="(min-width: 768px)" srcset="/images/large.webp" type="image/webp">
4015///   <source media="(min-width: 768px)" srcset="/images/large.jpg">
4016///   <source srcset="/images/small.webp" type="image/webp">
4017///   <img src="/images/small.jpg" alt="Responsive image">
4018/// </picture>
4019/// ```
4020///
4021/// # Accessibility
4022///
4023/// - The `alt` attribute should be on the `<img>` element, not `<picture>`
4024/// - Ensure all image variations convey the same essential information
4025/// - Test that fallback images are appropriate when sources don't match
4026///
4027/// # WHATWG Specification
4028///
4029/// - [4.8.1 The picture element](https://html.spec.whatwg.org/multipage/embedded-content.html#the-picture-element)
4030pub struct Picture;
4031impl HtmlElement for Picture {
4032    const TAG: &'static str = "picture";
4033}
4034impl FlowContent for Picture {}
4035impl PhrasingContent for Picture {}
4036impl EmbeddedContent for Picture {}
4037impl PalpableContent for Picture {}
4038
4039/// The `<source>` element - specifies media resources for `<picture>`, `<audio>`, and `<video>`.
4040///
4041/// # Purpose
4042///
4043/// The `<source>` element specifies multiple media resources for `<picture>`, `<audio>`, or
4044/// `<video>` elements. The browser selects the most appropriate source based on media queries,
4045/// format support, and other conditions. It enables responsive media delivery and format fallbacks.
4046///
4047/// # Content Categories
4048///
4049/// - None (used only within specific parent elements)
4050///
4051/// # Permitted Content Model
4052///
4053/// - None (void element)
4054///
4055/// # Common Use Cases
4056///
4057/// - Providing multiple video formats for cross-browser compatibility
4058/// - Offering different audio quality levels or formats
4059/// - Specifying image sources for different screen sizes in `<picture>`
4060/// - Delivering modern media formats with legacy fallbacks
4061/// - Bandwidth optimization with multiple quality levels
4062///
4063/// # Key Attributes
4064///
4065/// - `src`: URL of the media resource (for `<audio>` and `<video>`)
4066/// - `srcset`: Image URLs for responsive images (for `<picture>`)
4067/// - `type`: MIME type of the resource
4068/// - `media`: Media query for when this source applies
4069/// - `sizes`: Image sizes for different viewport widths (for `<picture>`)
4070/// - `width`: Intrinsic width for image sources
4071/// - `height`: Intrinsic height for image sources
4072///
4073/// # Example
4074///
4075/// ```html
4076/// <!-- Video with multiple formats -->
4077/// <video controls>
4078///   <source src="/video/movie.webm" type="video/webm">
4079///   <source src="/video/movie.mp4" type="video/mp4">
4080///   Your browser doesn't support the video element.
4081/// </video>
4082///
4083/// <!-- Audio with quality options -->
4084/// <audio controls>
4085///   <source src="/audio/music.opus" type="audio/opus">
4086///   <source src="/audio/music.ogg" type="audio/ogg">
4087///   <source src="/audio/music.mp3" type="audio/mpeg">
4088/// </audio>
4089///
4090/// <!-- Responsive images in picture element -->
4091/// <picture>
4092///   <source media="(min-width: 1200px)" srcset="/images/xl.jpg">
4093///   <source media="(min-width: 768px)" srcset="/images/lg.jpg">
4094///   <source srcset="/images/sm.jpg">
4095///   <img src="/images/fallback.jpg" alt="Description">
4096/// </picture>
4097///
4098/// <!-- Modern image formats with type hints -->
4099/// <picture>
4100///   <source srcset="/images/photo.avif" type="image/avif">
4101///   <source srcset="/images/photo.webp" type="image/webp">
4102///   <img src="/images/photo.jpg" alt="Photo">
4103/// </picture>
4104/// ```
4105///
4106/// # WHATWG Specification
4107///
4108/// - [4.8.2 The source element](https://html.spec.whatwg.org/multipage/embedded-content.html#the-source-element)
4109pub struct Source;
4110impl HtmlElement for Source {
4111    const TAG: &'static str = "source";
4112    const VOID: bool = true;
4113}
4114
4115/// The `<audio>` element - embeds sound content into documents.
4116///
4117/// # Purpose
4118///
4119/// The `<audio>` element is used to embed audio content in documents. It may contain one or
4120/// more audio sources using nested `<source>` elements or the `src` attribute. The browser
4121/// will choose the most suitable source. It provides built-in playback controls and APIs for
4122/// programmatic control.
4123///
4124/// # Content Categories
4125///
4126/// - Flow Content
4127/// - Phrasing Content
4128/// - Embedded Content
4129/// - If with `controls` attribute: Interactive Content
4130/// - Palpable Content
4131///
4132/// # Permitted Content Model
4133///
4134/// - Zero or more `<source>` elements
4135/// - Zero or more `<track>` elements
4136/// - Transparent content (fallback for browsers without audio support)
4137/// - No media elements among descendants
4138///
4139/// # Common Use Cases
4140///
4141/// - Music players and playlists
4142/// - Podcast players and audio articles
4143/// - Sound effects for interactive elements
4144/// - Audio feedback for user actions
4145/// - Background music or ambient sound
4146///
4147/// # Key Attributes
4148///
4149/// - `src`: URL of the audio file
4150/// - `controls`: Show playback controls
4151/// - `autoplay`: Automatically start playback (use with caution)
4152/// - `loop`: Loop the audio
4153/// - `muted`: Mute audio by default
4154/// - `preload`: Hint for loading strategy ("none", "metadata", "auto")
4155/// - `crossorigin`: CORS settings for audio fetching
4156/// - `volume`: Initial volume (0.0 to 1.0, set via JavaScript)
4157///
4158/// # Example
4159///
4160/// ```html
4161/// <!-- Basic audio player -->
4162/// <audio src="/audio/music.mp3" controls>
4163///   Your browser doesn't support the audio element.
4164/// </audio>
4165///
4166/// <!-- Multiple format sources -->
4167/// <audio controls>
4168///   <source src="/audio/podcast.opus" type="audio/opus">
4169///   <source src="/audio/podcast.ogg" type="audio/ogg; codecs=vorbis">
4170///   <source src="/audio/podcast.mp3" type="audio/mpeg">
4171///   <p>Your browser doesn't support HTML5 audio. <a href="/audio/podcast.mp3">Download</a></p>
4172/// </audio>
4173///
4174/// <!-- Looping background audio -->
4175/// <audio src="/audio/ambient.mp3" loop muted autoplay>
4176/// </audio>
4177///
4178/// <!-- Audio with preloading control -->
4179/// <audio src="/audio/effect.mp3" preload="none" id="sound-effect">
4180/// </audio>
4181/// ```
4182///
4183/// # Accessibility
4184///
4185/// - Provide transcripts for audio-only content
4186/// - Use captions/transcripts for important information conveyed via audio
4187/// - Don't use `autoplay` with sound, as it can be disruptive
4188/// - Ensure playback controls are keyboard accessible
4189/// - Consider users with hearing impairments
4190///
4191/// # WHATWG Specification
4192///
4193/// - [4.8.9 The audio element](https://html.spec.whatwg.org/multipage/media.html#the-audio-element)
4194pub struct Audio;
4195impl HtmlElement for Audio {
4196    const TAG: &'static str = "audio";
4197}
4198impl FlowContent for Audio {}
4199impl PhrasingContent for Audio {}
4200impl EmbeddedContent for Audio {}
4201impl PalpableContent for Audio {}
4202
4203/// The `<video>` element - embeds video content into documents.
4204///
4205/// # Purpose
4206///
4207/// The `<video>` element embeds video content in documents. It may contain multiple video
4208/// sources via `<source>` elements or use the `src` attribute. Provides native playback
4209/// controls, poster images, and comprehensive JavaScript APIs for media control and monitoring.
4210///
4211/// # Content Categories
4212///
4213/// - Flow Content
4214/// - Phrasing Content
4215/// - Embedded Content
4216/// - Interactive Content
4217/// - Palpable Content
4218///
4219/// # Permitted Content Model
4220///
4221/// - Zero or more `<source>` elements
4222/// - Zero or more `<track>` elements
4223/// - Transparent content (fallback for browsers without video support)
4224/// - No media elements among descendants
4225///
4226/// # Common Use Cases
4227///
4228/// - Embedding tutorial and educational videos
4229/// - Product demonstrations and marketing videos
4230/// - Video backgrounds for hero sections
4231/// - Live streaming and recorded broadcasts
4232/// - Video conferencing and communication
4233///
4234/// # Key Attributes
4235///
4236/// - `src`: URL of the video file
4237/// - `controls`: Display video controls
4238/// - `autoplay`: Automatically start playback
4239/// - `loop`: Loop the video
4240/// - `muted`: Mute audio by default
4241/// - `poster`: URL of image to show before playback
4242/// - `preload`: Loading strategy ("none", "metadata", "auto")
4243/// - `width`: Display width in CSS pixels
4244/// - `height`: Display height in CSS pixels
4245/// - `playsinline`: Play inline on mobile devices
4246/// - `crossorigin`: CORS settings for video fetching
4247///
4248/// # Example
4249///
4250/// ```html
4251/// <!-- Basic video with controls -->
4252/// <video src="/videos/tutorial.mp4" controls width="640" height="360">
4253///   Your browser doesn't support the video element.
4254/// </video>
4255///
4256/// <!-- Multiple sources with poster -->
4257/// <video controls width="800" height="450" poster="/images/poster.jpg">
4258///   <source src="/videos/movie.webm" type="video/webm">
4259///   <source src="/videos/movie.mp4" type="video/mp4">
4260///   <track src="/captions/en.vtt" kind="subtitles" srclang="en" label="English">
4261///   <p>Your browser doesn't support HTML5 video. <a href="/videos/movie.mp4">Download</a></p>
4262/// </video>
4263///
4264/// <!-- Autoplay muted background video -->
4265/// <video autoplay loop muted playsinline class="bg-video">
4266///   <source src="/videos/background.webm" type="video/webm">
4267///   <source src="/videos/background.mp4" type="video/mp4">
4268/// </video>
4269///
4270/// <!-- Video with lazy loading -->
4271/// <video controls preload="none" poster="/images/video-thumb.jpg">
4272///   <source src="/videos/demo.mp4" type="video/mp4">
4273/// </video>
4274/// ```
4275///
4276/// # Accessibility
4277///
4278/// - Provide captions for deaf and hard-of-hearing users
4279/// - Include audio descriptions for blind and low-vision users
4280/// - Ensure video controls are keyboard accessible
4281/// - Provide transcripts for video content
4282/// - Use descriptive poster images
4283/// - Avoid autoplay with sound (can be disorienting)
4284/// - Ensure sufficient contrast for controls
4285///
4286/// # WHATWG Specification
4287///
4288/// - [4.8.9 The video element](https://html.spec.whatwg.org/multipage/media.html#the-video-element)
4289pub struct Video;
4290impl HtmlElement for Video {
4291    const TAG: &'static str = "video";
4292}
4293impl FlowContent for Video {}
4294impl PhrasingContent for Video {}
4295impl EmbeddedContent for Video {}
4296impl InteractiveContent for Video {}
4297impl PalpableContent for Video {}
4298
4299/// The `<track>` element - specifies timed text tracks for media elements.
4300///
4301/// # Purpose
4302///
4303/// The `<track>` element provides text tracks for `<audio>` and `<video>` elements. These
4304/// tracks include subtitles, captions, descriptions, chapters, and metadata. Tracks are in
4305/// `WebVTT` format and can be displayed or processed programmatically to enhance media accessibility
4306/// and user experience.
4307///
4308/// # Content Categories
4309///
4310/// - None (used only within `<audio>` and `<video>` elements)
4311///
4312/// # Permitted Content Model
4313///
4314/// - None (void element)
4315///
4316/// # Common Use Cases
4317///
4318/// - Subtitles for foreign language translation
4319/// - Closed captions for deaf and hard-of-hearing users
4320/// - Audio descriptions for blind and low-vision users
4321/// - Chapter markers for video navigation
4322/// - Metadata tracks for programmatic access
4323///
4324/// # Key Attributes
4325///
4326/// - `kind`: Type of track ("subtitles", "captions", "descriptions", "chapters", "metadata")
4327/// - `src`: URL of the track file (`WebVTT` format, required)
4328/// - `srclang`: Language of the track text (required for subtitles)
4329/// - `label`: User-readable title for the track
4330/// - `default`: Enable this track by default
4331///
4332/// # Example
4333///
4334/// ```html
4335/// <!-- Video with multiple subtitle tracks -->
4336/// <video controls>
4337///   <source src="/videos/movie.mp4" type="video/mp4">
4338///   <track kind="subtitles" src="/subs/en.vtt" srclang="en" label="English" default>
4339///   <track kind="subtitles" src="/subs/es.vtt" srclang="es" label="Español">
4340///   <track kind="subtitles" src="/subs/fr.vtt" srclang="fr" label="Français">
4341/// </video>
4342///
4343/// <!-- Video with captions and descriptions -->
4344/// <video controls>
4345///   <source src="/videos/tutorial.mp4" type="video/mp4">
4346///   <track kind="captions" src="/captions/en.vtt" srclang="en" label="English Captions" default>
4347///   <track kind="descriptions" src="/descriptions/en.vtt" srclang="en" label="Audio Descriptions">
4348///   <track kind="chapters" src="/chapters/en.vtt" srclang="en" label="Chapters">
4349/// </video>
4350///
4351/// <!-- Audio with chapter markers -->
4352/// <audio controls>
4353///   <source src="/audio/podcast.mp3" type="audio/mpeg">
4354///   <track kind="chapters" src="/chapters/podcast.vtt" srclang="en" label="Episode Chapters">
4355///   <track kind="metadata" src="/metadata/podcast.vtt">
4356/// </audio>
4357/// ```
4358///
4359/// # Accessibility
4360///
4361/// - Use `kind="captions"` for accessibility (includes sound effects and speaker identification)
4362/// - Use `kind="subtitles"` for translation only
4363/// - Provide descriptions for visual content that isn't conveyed through audio
4364/// - Ensure track files are in proper `WebVTT` format
4365/// - Set appropriate default tracks based on user preferences
4366///
4367/// # WHATWG Specification
4368///
4369/// - [4.8.11 The track element](https://html.spec.whatwg.org/multipage/media.html#the-track-element)
4370pub struct Track;
4371impl HtmlElement for Track {
4372    const TAG: &'static str = "track";
4373    const VOID: bool = true;
4374}
4375
4376/// The `<map>` element - defines an image map with clickable areas.
4377///
4378/// # Purpose
4379///
4380/// The `<map>` element defines an image map - a collection of clickable areas on an image.
4381/// Used with the `<area>` element to create hotspots on images that link to different
4382/// destinations. Images reference maps using the `usemap` attribute.
4383///
4384/// # Content Categories
4385///
4386/// - Flow Content
4387/// - Phrasing Content
4388/// - Palpable Content
4389///
4390/// # Permitted Content Model
4391///
4392/// - Transparent content (typically contains `<area>` elements)
4393///
4394/// # Common Use Cases
4395///
4396/// - Interactive geographic maps with region links
4397/// - Architectural floor plans with clickable rooms
4398/// - Organizational charts with clickable positions
4399/// - Product images with clickable component areas
4400/// - Educational diagrams with interactive sections
4401///
4402/// # Key Attributes
4403///
4404/// - `name`: Name referenced by `<img>` element's `usemap` attribute (required)
4405///
4406/// # Example
4407///
4408/// ```html
4409/// <!-- Image map for a world map -->
4410/// <img src="/images/world-map.jpg" alt="World Map" usemap="#world">
4411/// <map name="world">
4412///   <area shape="rect" coords="0,0,100,100" href="/regions/north-america" alt="North America">
4413///   <area shape="rect" coords="100,0,200,100" href="/regions/europe" alt="Europe">
4414///   <area shape="circle" coords="150,150,50" href="/regions/asia" alt="Asia">
4415///   <area shape="poly" coords="50,200,100,250,50,300" href="/regions/africa" alt="Africa">
4416/// </map>
4417///
4418/// <!-- Interactive floor plan -->
4419/// <img src="/images/floor-plan.png" alt="Office Floor Plan" usemap="#office-map">
4420/// <map name="office-map">
4421///   <area shape="rect" coords="10,10,110,60" href="/rooms/conference-a" alt="Conference Room A">
4422///   <area shape="rect" coords="120,10,220,60" href="/rooms/conference-b" alt="Conference Room B">
4423///   <area shape="rect" coords="10,70,110,120" href="/rooms/kitchen" alt="Kitchen">
4424/// </map>
4425///
4426/// <!-- Product feature map -->
4427/// <img src="/images/product.jpg" alt="Product Features" usemap="#features">
4428/// <map name="features">
4429///   <area shape="circle" coords="100,100,30" href="#feature-1" alt="Feature 1: Display">
4430///   <area shape="circle" coords="200,100,30" href="#feature-2" alt="Feature 2: Controls">
4431/// </map>
4432/// ```
4433///
4434/// # Accessibility
4435///
4436/// - Provide meaningful `alt` text for each `<area>` element
4437/// - Ensure keyboard navigation is available for all areas
4438/// - Consider providing a text-based alternative navigation
4439/// - Test with screen readers to ensure areas are announced properly
4440/// - Ensure sufficient clickable area size for touch interfaces
4441///
4442/// # WHATWG Specification
4443///
4444/// - [4.8.13 The map element](https://html.spec.whatwg.org/multipage/image-maps.html#the-map-element)
4445pub struct Map;
4446impl HtmlElement for Map {
4447    const TAG: &'static str = "map";
4448}
4449impl FlowContent for Map {}
4450impl PhrasingContent for Map {}
4451impl PalpableContent for Map {}
4452
4453/// The `<area>` element - defines a clickable area within an image map.
4454///
4455/// # Purpose
4456///
4457/// The `<area>` element defines a hot-spot region on an image map and specifies the
4458/// hyperlink target for that region. Must be used as a descendant of a `<map>` element.
4459/// Supports rectangular, circular, and polygonal shapes.
4460///
4461/// # Content Categories
4462///
4463/// - Flow Content
4464/// - Phrasing Content
4465///
4466/// # Permitted Content Model
4467///
4468/// - None (void element)
4469///
4470/// # Common Use Cases
4471///
4472/// - Creating clickable regions on geographic maps
4473/// - Interactive product diagrams with feature links
4474/// - Organizational charts with clickable positions
4475/// - Architectural plans with room navigation
4476/// - Educational diagrams with section links
4477///
4478/// # Key Attributes
4479///
4480/// - `shape`: Shape of the area ("rect", "circle", "poly", "default")
4481/// - `coords`: Coordinates defining the shape
4482/// - `href`: URL the area links to
4483/// - `alt`: Alternative text for the area (required)
4484/// - `target`: Browsing context for navigation
4485/// - `download`: Download the resource instead of navigating
4486/// - `ping`: URLs to ping when the link is followed
4487/// - `rel`: Relationship between current document and target
4488/// - `referrerpolicy`: Referrer policy for navigation
4489///
4490/// # Example
4491///
4492/// ```html
4493/// <!-- Rectangular areas -->
4494/// <map name="nav-map">
4495///   <area shape="rect" coords="0,0,100,50" href="/home" alt="Home">
4496///   <area shape="rect" coords="100,0,200,50" href="/about" alt="About">
4497///   <area shape="rect" coords="200,0,300,50" href="/contact" alt="Contact">
4498/// </map>
4499///
4500/// <!-- Circular area -->
4501/// <map name="button-map">
4502///   <area shape="circle" coords="150,150,75" href="/action" alt="Click to activate">
4503/// </map>
4504///
4505/// <!-- Polygon area (triangle) -->
4506/// <map name="complex-map">
4507///   <area shape="poly" coords="100,50,150,150,50,150" href="/info" alt="Information">
4508/// </map>
4509///
4510/// <!-- Default area (fallback for unmapped regions) -->
4511/// <map name="diagram">
4512///   <area shape="rect" coords="10,10,90,90" href="/section-1" alt="Section 1">
4513///   <area shape="default" href="/overview" alt="General overview">
4514/// </map>
4515/// ```
4516///
4517/// # Accessibility
4518///
4519/// - Always provide meaningful `alt` text describing the area's purpose
4520/// - Ensure `alt` text is concise and descriptive
4521/// - Make sure areas are large enough for touch interaction (minimum 44x44 pixels)
4522/// - Provide keyboard-accessible alternatives to image maps when possible
4523/// - Consider using semantic HTML links instead of image maps for better accessibility
4524///
4525/// # WHATWG Specification
4526///
4527/// - [4.8.14 The area element](https://html.spec.whatwg.org/multipage/image-maps.html#the-area-element)
4528pub struct Area;
4529impl HtmlElement for Area {
4530    const TAG: &'static str = "area";
4531    const VOID: bool = true;
4532}
4533impl FlowContent for Area {}
4534impl PhrasingContent for Area {}
4535
4536// =============================================================================
4537// Embedded Content
4538// =============================================================================
4539
4540/// The `<iframe>` element - embeds another HTML page within the current page.
4541///
4542/// # Purpose
4543///
4544/// The `<iframe>` element represents a nested browsing context, embedding another HTML page
4545/// into the current document. Creates an isolated environment for displaying external content,
4546/// third-party widgets, or sandboxed applications with controlled permissions and communication.
4547///
4548/// # Content Categories
4549///
4550/// - Flow Content
4551/// - Phrasing Content
4552/// - Embedded Content
4553/// - Interactive Content
4554/// - Palpable Content
4555///
4556/// # Permitted Content Model
4557///
4558/// - Nothing (fallback text for browsers that don't support iframes)
4559///
4560/// # Common Use Cases
4561///
4562/// - Embedding third-party content (maps, videos, social media)
4563/// - Displaying external widgets and plugins
4564/// - Creating sandboxed environments for untrusted content
4565/// - Loading advertisements in isolated contexts
4566/// - Embedding interactive tools and applications
4567///
4568/// # Key Attributes
4569///
4570/// - `src`: URL of the page to embed
4571/// - `srcdoc`: Inline HTML content to display
4572/// - `name`: Name for targeting the iframe
4573/// - `sandbox`: Security restrictions (empty or space-separated tokens)
4574/// - `allow`: Permissions policy (features the iframe can use)
4575/// - `width`: Width in CSS pixels
4576/// - `height`: Height in CSS pixels
4577/// - `loading`: Lazy loading ("lazy" or "eager")
4578/// - `referrerpolicy`: Referrer policy for requests
4579/// - `allowfullscreen`: Allow fullscreen mode
4580/// - `allowpaymentrequest`: Allow Payment Request API
4581///
4582/// # Example
4583///
4584/// ```html
4585/// <!-- Basic iframe embedding -->
4586/// <iframe src="https://example.com/widget" width="600" height="400">
4587///   Your browser doesn't support iframes.
4588/// </iframe>
4589///
4590/// <!-- Sandboxed iframe with restrictions -->
4591/// <iframe src="/untrusted.html"
4592///         sandbox="allow-scripts allow-same-origin"
4593///         width="100%" height="300">
4594/// </iframe>
4595///
4596/// <!-- Lazy-loaded iframe -->
4597/// <iframe src="https://www.youtube.com/embed/VIDEO_ID"
4598///         width="560" height="315"
4599///         loading="lazy"
4600///         allowfullscreen>
4601/// </iframe>
4602///
4603/// <!-- Iframe with inline content -->
4604/// <iframe srcdoc="<h1>Hello World</h1><p>This is inline HTML content.</p>"
4605///         width="400" height="200">
4606/// </iframe>
4607///
4608/// <!-- Iframe with permissions policy -->
4609/// <iframe src="/map.html"
4610///         allow="geolocation 'self'; camera 'none'"
4611///         width="800" height="600">
4612/// </iframe>
4613/// ```
4614///
4615/// # Accessibility
4616///
4617/// - Provide a descriptive `title` attribute for screen readers
4618/// - Ensure iframe content is keyboard accessible
4619/// - Consider whether iframe content should be directly in the page instead
4620/// - Test that embedded content meets accessibility standards
4621/// - Ensure iframe has meaningful fallback text
4622///
4623/// # WHATWG Specification
4624///
4625/// - [4.8.5 The iframe element](https://html.spec.whatwg.org/multipage/iframe-embed-object.html#the-iframe-element)
4626pub struct Iframe;
4627impl HtmlElement for Iframe {
4628    const TAG: &'static str = "iframe";
4629}
4630impl FlowContent for Iframe {}
4631impl PhrasingContent for Iframe {}
4632impl EmbeddedContent for Iframe {}
4633impl InteractiveContent for Iframe {}
4634impl PalpableContent for Iframe {}
4635
4636/// The `<embed>` element - embeds external content at the specified point.
4637///
4638/// # Purpose
4639///
4640/// The `<embed>` element represents an integration point for external application or
4641/// interactive content, typically handled by a browser plugin. While historically used
4642/// for Flash and other plugins, it's now primarily used for embedding PDFs and other
4643/// plugin-based content. Modern alternatives like `<video>`, `<audio>`, and `<iframe>`
4644/// are preferred when applicable.
4645///
4646/// # Content Categories
4647///
4648/// - Flow Content
4649/// - Phrasing Content
4650/// - Embedded Content
4651/// - Interactive Content
4652/// - Palpable Content
4653///
4654/// # Permitted Content Model
4655///
4656/// - None (void element)
4657///
4658/// # Common Use Cases
4659///
4660/// - Embedding PDF documents inline
4661/// - Displaying plugin-based content (legacy)
4662/// - Embedding specialized media types
4663/// - Integration with native applications
4664/// - Displaying Flash content (legacy, deprecated)
4665///
4666/// # Key Attributes
4667///
4668/// - `src`: URL of the resource to embed (required)
4669/// - `type`: MIME type of the embedded content
4670/// - `width`: Width in CSS pixels
4671/// - `height`: Height in CSS pixels
4672/// - Any custom attributes for the plugin
4673///
4674/// # Example
4675///
4676/// ```html
4677/// <!-- Embedding a PDF document -->
4678/// <embed src="/documents/manual.pdf"
4679///        type="application/pdf"
4680///        width="800"
4681///        height="600">
4682///
4683/// <!-- Embedding with explicit dimensions -->
4684/// <embed src="/media/content.swf"
4685///        type="application/x-shockwave-flash"
4686///        width="640"
4687///        height="480">
4688///
4689/// <!-- Simple embed without type -->
4690/// <embed src="/files/document.pdf" width="100%" height="500">
4691///
4692/// <!-- Embed with custom parameters -->
4693/// <embed src="/plugin/app.plugin"
4694///        type="application/x-custom-plugin"
4695///        width="400"
4696///        height="300"
4697///        quality="high">
4698/// ```
4699///
4700/// # Accessibility
4701///
4702/// - Provide alternative content mechanisms when possible
4703/// - Ensure embedded content is keyboard accessible
4704/// - Consider using modern alternatives (`<iframe>`, `<video>`, `<audio>`)
4705/// - Test with assistive technologies
4706/// - Provide download links as fallback
4707///
4708/// # WHATWG Specification
4709///
4710/// - [4.8.6 The embed element](https://html.spec.whatwg.org/multipage/iframe-embed-object.html#the-embed-element)
4711pub struct Embed;
4712impl HtmlElement for Embed {
4713    const TAG: &'static str = "embed";
4714    const VOID: bool = true;
4715}
4716impl FlowContent for Embed {}
4717impl PhrasingContent for Embed {}
4718impl EmbeddedContent for Embed {}
4719impl InteractiveContent for Embed {}
4720impl PalpableContent for Embed {}
4721
4722/// The `<object>` element - embeds external resource as an object.
4723///
4724/// # Purpose
4725///
4726/// The `<object>` element represents an external resource, which can be treated as an image,
4727/// nested browsing context, or resource to be handled by a plugin. It provides fallback
4728/// content for when the object cannot be displayed. More flexible than `<embed>` with better
4729/// fallback support, but modern elements like `<video>`, `<audio>`, and `<iframe>` are often
4730/// more appropriate.
4731///
4732/// # Content Categories
4733///
4734/// - Flow Content
4735/// - Phrasing Content
4736/// - Embedded Content
4737/// - If with `usemap` attribute: Interactive Content
4738/// - Palpable Content
4739///
4740/// # Permitted Content Model
4741///
4742/// - Zero or more `<param>` elements
4743/// - Followed by transparent content (fallback)
4744///
4745/// # Common Use Cases
4746///
4747/// - Embedding PDF documents with fallback
4748/// - Displaying SVG images with fallback content
4749/// - Plugin-based content with degradation path
4750/// - Embedding Flash content with alternatives (legacy)
4751/// - Nested browsing contexts with fallback options
4752///
4753/// # Key Attributes
4754///
4755/// - `data`: URL of the resource
4756/// - `type`: MIME type of the resource
4757/// - `name`: Name for form submission or scripting
4758/// - `width`: Width in CSS pixels
4759/// - `height`: Height in CSS pixels
4760/// - `usemap`: Associates with an image map
4761/// - `form`: Associates with a form element
4762/// - `typemustmatch`: Type attribute must match resource's type
4763///
4764/// # Example
4765///
4766/// ```html
4767/// <!-- PDF with fallback link -->
4768/// <object data="/documents/report.pdf"
4769///         type="application/pdf"
4770///         width="800"
4771///         height="600">
4772///   <p>Your browser doesn't support PDF viewing.
4773///      <a href="/documents/report.pdf">Download the PDF</a></p>
4774/// </object>
4775///
4776/// <!-- SVG with fallback image -->
4777/// <object data="/images/diagram.svg"
4778///         type="image/svg+xml"
4779///         width="400"
4780///         height="300">
4781///   <img src="/images/diagram.png" alt="Diagram">
4782/// </object>
4783///
4784/// <!-- Object with parameters -->
4785/// <object data="/media/animation.swf"
4786///         type="application/x-shockwave-flash"
4787///         width="640"
4788///         height="480">
4789///   <param name="quality" value="high">
4790///   <param name="autoplay" value="false">
4791///   <p>Flash content requires the Adobe Flash Player.</p>
4792/// </object>
4793///
4794/// <!-- Nested fallbacks -->
4795/// <object data="/video/movie.mp4" type="video/mp4">
4796///   <object data="/video/movie.ogv" type="video/ogg">
4797///     <p>Your browser doesn't support the video. <a href="/video/movie.mp4">Download</a></p>
4798///   </object>
4799/// </object>
4800/// ```
4801///
4802/// # Accessibility
4803///
4804/// - Provide meaningful fallback content
4805/// - Ensure embedded content is accessible
4806/// - Use `aria-label` or descriptive fallback text
4807/// - Test with assistive technologies
4808/// - Consider using semantic alternatives when available
4809///
4810/// # WHATWG Specification
4811///
4812/// - [4.8.7 The object element](https://html.spec.whatwg.org/multipage/iframe-embed-object.html#the-object-element)
4813pub struct Object;
4814impl HtmlElement for Object {
4815    const TAG: &'static str = "object";
4816}
4817impl FlowContent for Object {}
4818impl PhrasingContent for Object {}
4819impl EmbeddedContent for Object {}
4820impl PalpableContent for Object {}
4821
4822/// The `<param>` element - defines parameters for an `<object>` element.
4823///
4824/// # Purpose
4825///
4826/// The `<param>` element defines parameters that are passed to the plugin or application
4827/// instantiated by an `<object>` element. Each parameter is specified as a name-value pair.
4828/// Must be a child of an `<object>` element and appear before any fallback content.
4829///
4830/// # Content Categories
4831///
4832/// - None (used only within `<object>` elements)
4833///
4834/// # Permitted Content Model
4835///
4836/// - None (void element)
4837///
4838/// # Common Use Cases
4839///
4840/// - Passing configuration to Flash content
4841/// - Setting plugin initialization parameters
4842/// - Configuring embedded applications
4843/// - Controlling playback settings
4844/// - Specifying display or behavior options
4845///
4846/// # Key Attributes
4847///
4848/// - `name`: Name of the parameter (required)
4849/// - `value`: Value of the parameter (required)
4850///
4851/// # Example
4852///
4853/// ```html
4854/// <!-- Flash parameters -->
4855/// <object data="/media/animation.swf" type="application/x-shockwave-flash">
4856///   <param name="quality" value="high">
4857///   <param name="wmode" value="transparent">
4858///   <param name="allowfullscreen" value="true">
4859///   <param name="flashvars" value="autoplay=false&volume=50">
4860/// </object>
4861///
4862/// <!-- Plugin configuration -->
4863/// <object data="/plugins/viewer.plugin" type="application/x-custom">
4864///   <param name="autostart" value="false">
4865///   <param name="volume" value="75">
4866///   <param name="controls" value="true">
4867/// </object>
4868///
4869/// <!-- Multiple parameters for video -->
4870/// <object data="/media/video.mp4" type="video/mp4">
4871///   <param name="autoplay" value="false">
4872///   <param name="loop" value="false">
4873///   <param name="controls" value="true">
4874///   <p>Your browser doesn't support this video format.</p>
4875/// </object>
4876/// ```
4877///
4878/// # WHATWG Specification
4879///
4880/// - [4.8.8 The param element](https://html.spec.whatwg.org/multipage/iframe-embed-object.html#the-param-element)
4881pub struct Param;
4882impl HtmlElement for Param {
4883    const TAG: &'static str = "param";
4884    const VOID: bool = true;
4885}
4886
4887// =============================================================================
4888// SVG and MathML
4889// =============================================================================
4890
4891/// The `<svg>` element - embeds SVG (Scalable Vector Graphics) content.
4892///
4893/// # Purpose
4894///
4895/// The `<svg>` element is a container for SVG graphics. SVG is an XML-based vector image
4896/// format for defining two-dimensional graphics with support for interactivity and animation.
4897/// SVG images scale without loss of quality and can be styled with CSS and manipulated with
4898/// JavaScript.
4899///
4900/// # Content Categories
4901///
4902/// - Flow Content
4903/// - Phrasing Content
4904/// - Embedded Content
4905/// - Palpable Content
4906///
4907/// # Permitted Content Model
4908///
4909/// - SVG elements (follows SVG specification, not HTML)
4910///
4911/// # Common Use Cases
4912///
4913/// - Scalable icons and logos
4914/// - Data visualizations and charts
4915/// - Interactive graphics and diagrams
4916/// - Animated illustrations
4917/// - Responsive vector artwork
4918///
4919/// # Key Attributes
4920///
4921/// - `width`: Width of the SVG viewport
4922/// - `height`: Height of the SVG viewport
4923/// - `viewBox`: Define coordinate system and aspect ratio
4924/// - `preserveAspectRatio`: How to scale the viewBox
4925/// - `xmlns`: XML namespace (usually `"http://www.w3.org/2000/svg"`)
4926/// - Plus all SVG-specific attributes
4927///
4928/// # Example
4929///
4930/// ```html
4931/// <!-- Simple SVG circle -->
4932/// <svg width="100" height="100">
4933///   <circle cx="50" cy="50" r="40" fill="blue" />
4934/// </svg>
4935///
4936/// <!-- SVG with viewBox for responsive scaling -->
4937/// <svg viewBox="0 0 200 200" width="100%" height="auto">
4938///   <rect x="10" y="10" width="180" height="180" fill="lightblue" />
4939///   <circle cx="100" cy="100" r="50" fill="red" />
4940/// </svg>
4941///
4942/// <!-- Inline SVG icon -->
4943/// <svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor">
4944///   <path d="M3 9l9-7 9 7v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z"></path>
4945///   <polyline points="9 22 9 12 15 12 15 22"></polyline>
4946/// </svg>
4947///
4948/// <!-- SVG with accessibility -->
4949/// <svg role="img" aria-labelledby="logo-title" width="200" height="100">
4950///   <title id="logo-title">Company Logo</title>
4951///   <rect x="0" y="0" width="200" height="100" fill="#333"/>
4952///   <text x="100" y="55" text-anchor="middle" fill="white">LOGO</text>
4953/// </svg>
4954/// ```
4955///
4956/// # Accessibility
4957///
4958/// - Use `<title>` element inside SVG for accessible names
4959/// - Add `role="img"` for decorative or meaningful graphics
4960/// - Use `aria-labelledby` to reference title elements
4961/// - Provide `<desc>` for longer descriptions
4962/// - Use `aria-hidden="true"` for purely decorative SVGs
4963/// - Ensure sufficient color contrast
4964///
4965/// # WHATWG Specification
4966///
4967/// - [4.8.16 SVG](https://html.spec.whatwg.org/multipage/embedded-content.html#svg-0)
4968pub struct Svg;
4969impl HtmlElement for Svg {
4970    const TAG: &'static str = "svg";
4971}
4972impl FlowContent for Svg {}
4973impl PhrasingContent for Svg {}
4974impl EmbeddedContent for Svg {}
4975impl PalpableContent for Svg {}
4976
4977/// The `<math>` element - embeds `MathML` (Mathematical Markup Language) content.
4978///
4979/// # Purpose
4980///
4981/// The `<math>` element is the top-level element for `MathML` content, used to embed
4982/// mathematical expressions and equations in HTML documents. `MathML` provides semantic
4983/// markup for mathematical notation, enabling proper rendering, accessibility, and
4984/// computational manipulation of mathematical expressions.
4985///
4986/// # Content Categories
4987///
4988/// - Flow Content
4989/// - Phrasing Content
4990/// - Embedded Content
4991/// - Palpable Content
4992///
4993/// # Permitted Content Model
4994///
4995/// - `MathML` elements (follows `MathML` specification, not HTML)
4996///
4997/// # Common Use Cases
4998///
4999/// - Displaying mathematical equations and formulas
5000/// - Scientific and technical documentation
5001/// - Educational materials with math content
5002/// - Research papers and academic publications
5003/// - Interactive math applications
5004///
5005/// # Key Attributes
5006///
5007/// - `display`: "block" or "inline" (controls display mode)
5008/// - `xmlns`: XML namespace (usually `"http://www.w3.org/1998/Math/MathML"`)
5009/// - Plus all MathML-specific attributes
5010///
5011/// # Example
5012///
5013/// ```html
5014/// <!-- Inline math: Pythagorean theorem -->
5015/// <p>The Pythagorean theorem states that
5016/// <math>
5017///   <msup><mi>a</mi><mn>2</mn></msup>
5018///   <mo>+</mo>
5019///   <msup><mi>b</mi><mn>2</mn></msup>
5020///   <mo>=</mo>
5021///   <msup><mi>c</mi><mn>2</mn></msup>
5022/// </math>
5023/// </p>
5024///
5025/// <!-- Block math: Quadratic formula -->
5026/// <math display="block">
5027///   <mi>x</mi>
5028///   <mo>=</mo>
5029///   <mfrac>
5030///     <mrow>
5031///       <mo>−</mo><mi>b</mi>
5032///       <mo>±</mo>
5033///       <msqrt>
5034///         <msup><mi>b</mi><mn>2</mn></msup>
5035///         <mo>−</mo>
5036///         <mn>4</mn><mi>a</mi><mi>c</mi>
5037///       </msqrt>
5038///     </mrow>
5039///     <mrow>
5040///       <mn>2</mn><mi>a</mi>
5041///     </mrow>
5042///   </mfrac>
5043/// </math>
5044///
5045/// <!-- Fraction notation -->
5046/// <math>
5047///   <mfrac>
5048///     <mn>1</mn>
5049///     <mn>2</mn>
5050///   </mfrac>
5051/// </math>
5052///
5053/// <!-- Complex expression with matrix -->
5054/// <math display="block">
5055///   <mrow>
5056///     <mo>[</mo>
5057///     <mtable>
5058///       <mtr><mtd><mn>1</mn></mtd><mtd><mn>2</mn></mtd></mtr>
5059///       <mtr><mtd><mn>3</mn></mtd><mtd><mn>4</mn></mtd></mtr>
5060///     </mtable>
5061///     <mo>]</mo>
5062///   </mrow>
5063/// </math>
5064/// ```
5065///
5066/// # Accessibility
5067///
5068/// - `MathML` provides built-in semantic accessibility
5069/// - Screen readers can navigate and speak mathematical expressions
5070/// - Consider providing text alternatives for complex equations
5071/// - Ensure proper use of `MathML` semantic elements
5072/// - Test with assistive technologies that support `MathML`
5073///
5074/// # WHATWG Specification
5075///
5076/// - [4.8.16 MathML](https://html.spec.whatwg.org/multipage/embedded-content.html#mathml)
5077pub struct Math;
5078impl HtmlElement for Math {
5079    const TAG: &'static str = "math";
5080}
5081impl FlowContent for Math {}
5082impl PhrasingContent for Math {}
5083impl EmbeddedContent for Math {}
5084impl PalpableContent for Math {}
5085
5086// =============================================================================
5087// Scripting
5088// =============================================================================
5089
5090/// The `<script>` element - embeds or references executable code.
5091///
5092/// # Purpose
5093///
5094/// The `<script>` element embeds executable code or data, or references an external script
5095/// file. Primarily used for JavaScript, it enables dynamic behavior, interactivity, and
5096/// client-side functionality in web pages. Scripts can be inline or loaded from external files.
5097///
5098/// # Content Categories
5099///
5100/// - Metadata Content
5101/// - Flow Content
5102/// - Phrasing Content
5103/// - Script-supporting Element
5104///
5105/// # Permitted Content Model
5106///
5107/// - If no `src` attribute: inline script content matching the `type`
5108/// - If `src` attribute: no content or only comments and whitespace
5109///
5110/// # Common Use Cases
5111///
5112/// - Adding interactivity to web pages
5113/// - Manipulating the DOM dynamically
5114/// - Handling user events and input
5115/// - Making AJAX requests and fetching data
5116/// - Implementing client-side application logic
5117///
5118/// # Key Attributes
5119///
5120/// - `src`: URL of external script file
5121/// - `type`: MIME type of the script (default: "text/javascript")
5122/// - `async`: Execute asynchronously (for external scripts)
5123/// - `defer`: Defer execution until document parsing is complete
5124/// - `crossorigin`: CORS settings for script fetching
5125/// - `integrity`: Subresource integrity hash for security
5126/// - `referrerpolicy`: Referrer policy for script requests
5127/// - `nomodule`: Execute only in browsers that don't support ES modules
5128/// - `nonce`: Cryptographic nonce for Content Security Policy
5129///
5130/// # Example
5131///
5132/// ```html
5133/// <!-- External script -->
5134/// <script src="/js/app.js"></script>
5135///
5136/// <!-- External script with async loading -->
5137/// <script src="/js/analytics.js" async></script>
5138///
5139/// <!-- External script with deferred execution -->
5140/// <script src="/js/init.js" defer></script>
5141///
5142/// <!-- Inline script -->
5143/// <script>
5144///   console.log('Hello, World!');
5145///   document.addEventListener('DOMContentLoaded', function() {
5146///     // Initialize app
5147///   });
5148/// </script>
5149///
5150/// <!-- ES6 module -->
5151/// <script type="module">
5152///   import { init } from './modules/app.js';
5153///   init();
5154/// </script>
5155///
5156/// <!-- Script with integrity check -->
5157/// <script src="https://cdn.example.com/library.js"
5158///         integrity="sha384-ABC123..."
5159///         crossorigin="anonymous"></script>
5160///
5161/// <!-- JSON-LD structured data -->
5162/// <script type="application/ld+json">
5163/// {
5164///   "@context": "https://schema.org",
5165///   "@type": "Organization",
5166///   "name": "Example Company"
5167/// }
5168/// </script>
5169/// ```
5170///
5171/// # WHATWG Specification
5172///
5173/// - [4.12.1 The script element](https://html.spec.whatwg.org/multipage/scripting.html#the-script-element)
5174pub struct Script;
5175impl HtmlElement for Script {
5176    const TAG: &'static str = "script";
5177}
5178impl MetadataContent for Script {}
5179impl FlowContent for Script {}
5180impl PhrasingContent for Script {}
5181impl ScriptSupporting for Script {}
5182
5183/// The `<noscript>` element - defines fallback content for when scripts are disabled.
5184///
5185/// # Purpose
5186///
5187/// The `<noscript>` element provides fallback content for users who have disabled scripts
5188/// or use browsers that don't support scripting. The content inside is only displayed when
5189/// scripting is unavailable. Useful for providing alternative content, instructions, or
5190/// degraded experiences.
5191///
5192/// # Content Categories
5193///
5194/// - Metadata Content (when used in `<head>`)
5195/// - Flow Content (when used in `<body>`)
5196/// - Phrasing Content (when used in `<body>`)
5197///
5198/// # Permitted Content Model
5199///
5200/// - When in `<head>`: `<link>`, `<style>`, and `<meta>` elements
5201/// - When in `<body>`: Transparent content (with restrictions)
5202///
5203/// # Common Use Cases
5204///
5205/// - Providing messages about enabling JavaScript
5206/// - Offering alternative navigation when scripts fail
5207/// - Displaying static content as fallback
5208/// - Showing contact information when forms require JavaScript
5209/// - Providing download links for content requiring scripts
5210///
5211/// # Key Attributes
5212///
5213/// - Global attributes only
5214///
5215/// # Example
5216///
5217/// ```html
5218/// <!-- Message in head for styles -->
5219/// <head>
5220///   <noscript>
5221///     <style>
5222///       .js-only { display: none; }
5223///     </style>
5224///   </noscript>
5225/// </head>
5226///
5227/// <!-- Alternative content in body -->
5228/// <noscript>
5229///   <div class="alert">
5230///     <p>This website requires JavaScript to function properly.</p>
5231///     <p>Please enable JavaScript in your browser settings.</p>
5232///   </div>
5233/// </noscript>
5234///
5235/// <!-- Fallback for dynamic content -->
5236/// <div id="app">
5237///   <noscript>
5238///     <p>Our interactive application requires JavaScript.</p>
5239///     <p>You can still <a href="/static-version">view the static version</a>.</p>
5240///   </noscript>
5241/// </div>
5242///
5243/// <!-- Alternative form submission -->
5244/// <form id="ajax-form" action="/submit" method="post">
5245///   <noscript>
5246///     <p>JavaScript is disabled. Please use the traditional form submission.</p>
5247///     <input type="submit" value="Submit Form">
5248///   </noscript>
5249/// </form>
5250/// ```
5251///
5252/// # Accessibility
5253///
5254/// - Ensure noscript content is meaningful and helpful
5255/// - Provide clear instructions for enabling JavaScript if required
5256/// - Consider whether your site should work without JavaScript
5257/// - Test the experience with scripting disabled
5258///
5259/// # WHATWG Specification
5260///
5261/// - [4.12.2 The noscript element](https://html.spec.whatwg.org/multipage/scripting.html#the-noscript-element)
5262pub struct Noscript;
5263impl HtmlElement for Noscript {
5264    const TAG: &'static str = "noscript";
5265}
5266impl MetadataContent for Noscript {}
5267impl FlowContent for Noscript {}
5268impl PhrasingContent for Noscript {}
5269
5270/// The `<template>` element - holds HTML content that is not rendered immediately.
5271///
5272/// # Purpose
5273///
5274/// The `<template>` element is used to declare fragments of HTML that can be cloned and
5275/// inserted into the document via JavaScript. Its content is not rendered when the page loads,
5276/// making it ideal for client-side templating. The content is parsed but inert until activated.
5277///
5278/// # Content Categories
5279///
5280/// - Metadata Content
5281/// - Flow Content
5282/// - Phrasing Content
5283/// - Script-supporting Element
5284///
5285/// # Permitted Content Model
5286///
5287/// - Anything (content is inert and stored in a `DocumentFragment`)
5288///
5289/// # Common Use Cases
5290///
5291/// - Client-side HTML templates
5292/// - Repeating UI patterns (list items, cards, etc.)
5293/// - Dynamic content generation
5294/// - Web components and custom elements
5295/// - Avoiding script-based string concatenation
5296///
5297/// # Key Attributes
5298///
5299/// - Global attributes only
5300///
5301/// # Example
5302///
5303/// ```html
5304/// <!-- Template for list items -->
5305/// <template id="item-template">
5306///   <li class="item">
5307///     <h3 class="item-title"></h3>
5308///     <p class="item-description"></p>
5309///   </li>
5310/// </template>
5311///
5312/// <ul id="item-list"></ul>
5313///
5314/// <script>
5315///   const template = document.getElementById('item-template');
5316///   const list = document.getElementById('item-list');
5317///   
5318///   const clone = template.content.cloneNode(true);
5319///   clone.querySelector('.item-title').textContent = 'Title';
5320///   clone.querySelector('.item-description').textContent = 'Description';
5321///   list.appendChild(clone);
5322/// </script>
5323///
5324/// <!-- Card template -->
5325/// <template id="card-template">
5326///   <div class="card">
5327///     <img class="card-image" src="" alt="">
5328///     <div class="card-body">
5329///       <h4 class="card-title"></h4>
5330///       <p class="card-text"></p>
5331///       <a class="card-link" href="#">Learn more</a>
5332///     </div>
5333///   </div>
5334/// </template>
5335///
5336/// <!-- Table row template -->
5337/// <template id="row-template">
5338///   <tr>
5339///     <td class="col-name"></td>
5340///     <td class="col-email"></td>
5341///     <td class="col-role"></td>
5342///   </tr>
5343/// </template>
5344/// ```
5345///
5346/// # WHATWG Specification
5347///
5348/// - [4.12.3 The template element](https://html.spec.whatwg.org/multipage/scripting.html#the-template-element)
5349pub struct Template;
5350impl HtmlElement for Template {
5351    const TAG: &'static str = "template";
5352}
5353impl MetadataContent for Template {}
5354impl FlowContent for Template {}
5355impl PhrasingContent for Template {}
5356impl ScriptSupporting for Template {}
5357
5358/// The `<slot>` element - defines a placeholder in a web component's shadow DOM.
5359///
5360/// # Purpose
5361///
5362/// The `<slot>` element is part of the Web Components technology suite. It creates a
5363/// placeholder inside a web component that users can fill with their own markup. Slots
5364/// enable flexible, reusable components where content can be projected from the light DOM
5365/// into the shadow DOM.
5366///
5367/// # Content Categories
5368///
5369/// - Flow Content
5370/// - Phrasing Content
5371///
5372/// # Permitted Content Model
5373///
5374/// - Transparent content (fallback content when slot is not filled)
5375///
5376/// # Common Use Cases
5377///
5378/// - Creating reusable web components
5379/// - Defining customizable areas in shadow DOM templates
5380/// - Building flexible UI component libraries
5381/// - Implementing compound components with multiple insertion points
5382/// - Providing default fallback content for empty slots
5383///
5384/// # Key Attributes
5385///
5386/// - `name`: Named slot identifier (unnamed slots are default slots)
5387///
5388/// # Example
5389///
5390/// ```html
5391/// <!-- Custom element template (in shadow DOM) -->
5392/// <template id="card-template">
5393///   <style>
5394///     .card { border: 1px solid #ccc; padding: 1rem; }
5395///     .card-header { font-weight: bold; }
5396///   </style>
5397///   <div class="card">
5398///     <div class="card-header">
5399///       <slot name="header">Default Header</slot>
5400///     </div>
5401///     <div class="card-body">
5402///       <slot>Default content</slot>
5403///     </div>
5404///     <div class="card-footer">
5405///       <slot name="footer"></slot>
5406///     </div>
5407///   </div>
5408/// </template>
5409///
5410/// <!-- Usage of the custom element -->
5411/// <my-card>
5412///   <span slot="header">Custom Header</span>
5413///   <p>This is the main content that goes into the default slot.</p>
5414///   <small slot="footer">Footer text</small>
5415/// </my-card>
5416///
5417/// <!-- Named slots with fallback -->
5418/// <custom-dialog>
5419///   <h2 slot="title">Confirmation</h2>
5420///   <p>Are you sure you want to proceed?</p>
5421///   <div slot="actions">
5422///     <button>Cancel</button>
5423///     <button>OK</button>
5424///   </div>
5425/// </custom-dialog>
5426/// ```
5427///
5428/// # WHATWG Specification
5429///
5430/// - [4.12.4 The slot element](https://html.spec.whatwg.org/multipage/scripting.html#the-slot-element)
5431pub struct Slot;
5432impl HtmlElement for Slot {
5433    const TAG: &'static str = "slot";
5434}
5435impl FlowContent for Slot {}
5436impl PhrasingContent for Slot {}
5437
5438/// The `<canvas>` element - provides a bitmap drawing surface for graphics via JavaScript.
5439///
5440/// # Purpose
5441///
5442/// The `<canvas>` element provides a resolution-dependent bitmap canvas for drawing graphics
5443/// via JavaScript and the Canvas API. It can be used for rendering graphs, game graphics,
5444/// animations, photo composition, real-time video processing, and other visual images on the fly.
5445///
5446/// # Content Categories
5447///
5448/// - Flow Content
5449/// - Phrasing Content
5450/// - Embedded Content
5451/// - Palpable Content
5452///
5453/// # Permitted Content Model
5454///
5455/// - Transparent content (fallback for browsers without canvas support)
5456///
5457/// # Common Use Cases
5458///
5459/// - 2D games and interactive animations
5460/// - Data visualizations and charts
5461/// - Image editing and manipulation
5462/// - Real-time video effects and filters
5463/// - Drawing tools and diagramming applications
5464///
5465/// # Key Attributes
5466///
5467/// - `width`: Width of the canvas in CSS pixels (default: 300)
5468/// - `height`: Height of the canvas in CSS pixels (default: 150)
5469///
5470/// # Example
5471///
5472/// ```html
5473/// <!-- Basic canvas -->
5474/// <canvas id="myCanvas" width="800" height="600">
5475///   Your browser doesn't support the canvas element.
5476/// </canvas>
5477/// <script>
5478///   const ctx = document.getElementById('myCanvas').getContext('2d');
5479///   ctx.fillStyle = 'blue';
5480///   ctx.fillRect(10, 10, 100, 100);
5481/// </script>
5482///
5483/// <!-- Canvas for charts -->
5484/// <canvas id="chart" width="600" height="400" aria-label="Sales data chart">
5485///   <p>Sales data: Q1: $100k, Q2: $150k, Q3: $175k, Q4: $200k</p>
5486/// </canvas>
5487///
5488/// <!-- Game canvas -->
5489/// <canvas id="gameCanvas" width="1024" height="768">
5490///   <p>This game requires a browser with canvas support.</p>
5491/// </canvas>
5492///
5493/// <!-- High DPI canvas -->
5494/// <canvas id="hdCanvas" width="1600" height="1200" style="width: 800px; height: 600px;">
5495///   Fallback content for accessibility.
5496/// </canvas>
5497/// ```
5498///
5499/// # Accessibility
5500///
5501/// - Provide meaningful fallback content describing what the canvas shows
5502/// - Use `aria-label` or `aria-labelledby` to describe the canvas purpose
5503/// - For interactive canvases, ensure keyboard accessibility
5504/// - Consider providing alternative text-based representations of visual data
5505/// - Use ARIA live regions to announce dynamic changes
5506/// - Ensure canvas content has sufficient color contrast
5507///
5508/// # WHATWG Specification
5509///
5510/// - [4.12.5 The canvas element](https://html.spec.whatwg.org/multipage/canvas.html#the-canvas-element)
5511pub struct Canvas;
5512impl HtmlElement for Canvas {
5513    const TAG: &'static str = "canvas";
5514}
5515impl FlowContent for Canvas {}
5516impl PhrasingContent for Canvas {}
5517impl EmbeddedContent for Canvas {}
5518impl PalpableContent for Canvas {}
5519
5520// =============================================================================
5521// Table Content
5522// =============================================================================
5523
5524/// The `<table>` element - represents tabular data in rows and columns.
5525///
5526/// # Purpose
5527///
5528/// The `<table>` element represents data with more than one dimension in the form of a table.
5529/// Tables should be used for tabular data, not for layout purposes (use CSS for layout).
5530/// Provides semantic structure for organizing related information in rows and columns.
5531///
5532/// # Content Categories
5533///
5534/// - Flow Content
5535/// - Palpable Content
5536///
5537/// # Permitted Content Model
5538///
5539/// - Optional `<caption>` element
5540/// - Zero or more `<colgroup>` elements
5541/// - Optional `<thead>` element
5542/// - Either: zero or more `<tbody>` elements, or one or more `<tr>` elements
5543/// - Optional `<tfoot>` element
5544///
5545/// # Common Use Cases
5546///
5547/// - Displaying datasets and spreadsheet-like data
5548/// - Pricing tables and comparison charts
5549/// - Financial reports and statistics
5550/// - Schedules and calendars
5551/// - Product specifications and feature comparisons
5552///
5553/// # Key Attributes
5554///
5555/// - Global attributes only (older attributes like `border` are obsolete)
5556///
5557/// # Example
5558///
5559/// ```html
5560/// <!-- Basic table -->
5561/// <table>
5562///   <thead>
5563///     <tr>
5564///       <th>Name</th>
5565///       <th>Age</th>
5566///       <th>City</th>
5567///     </tr>
5568///   </thead>
5569///   <tbody>
5570///     <tr>
5571///       <td>Alice</td>
5572///       <td>30</td>
5573///       <td>New York</td>
5574///     </tr>
5575///     <tr>
5576///       <td>Bob</td>
5577///       <td>25</td>
5578///       <td>Los Angeles</td>
5579///     </tr>
5580///   </tbody>
5581/// </table>
5582///
5583/// <!-- Table with caption and footer -->
5584/// <table>
5585///   <caption>Quarterly Sales Report</caption>
5586///   <thead>
5587///     <tr>
5588///       <th>Quarter</th>
5589///       <th>Revenue</th>
5590///       <th>Growth</th>
5591///     </tr>
5592///   </thead>
5593///   <tbody>
5594///     <tr>
5595///       <td>Q1</td>
5596///       <td>$100,000</td>
5597///       <td>5%</td>
5598///     </tr>
5599///     <tr>
5600///       <td>Q2</td>
5601///       <td>$120,000</td>
5602///       <td>20%</td>
5603///     </tr>
5604///   </tbody>
5605///   <tfoot>
5606///     <tr>
5607///       <td>Total</td>
5608///       <td>$220,000</td>
5609///       <td>12.5%</td>
5610///     </tr>
5611///   </tfoot>
5612/// </table>
5613///
5614/// <!-- Complex table with column groups -->
5615/// <table>
5616///   <colgroup>
5617///     <col>
5618///     <col span="2" class="financial">
5619///   </colgroup>
5620///   <thead>
5621///     <tr>
5622///       <th>Product</th>
5623///       <th>Price</th>
5624///       <th>Stock</th>
5625///     </tr>
5626///   </thead>
5627///   <tbody>
5628///     <tr>
5629///       <td>Widget</td>
5630///       <td>$10</td>
5631///       <td>50</td>
5632///     </tr>
5633///   </tbody>
5634/// </table>
5635/// ```
5636///
5637/// # Accessibility
5638///
5639/// - Use `<th>` elements for headers with `scope` attribute
5640/// - Provide a `<caption>` for table context
5641/// - Use `headers` attribute for complex tables
5642/// - Ensure proper header association for screen readers
5643/// - Consider using `aria-describedby` for additional context
5644/// - Make tables responsive for mobile devices
5645///
5646/// # WHATWG Specification
5647///
5648/// - [4.9.1 The table element](https://html.spec.whatwg.org/multipage/tables.html#the-table-element)
5649pub struct Table;
5650impl HtmlElement for Table {
5651    const TAG: &'static str = "table";
5652}
5653impl FlowContent for Table {}
5654impl PalpableContent for Table {}
5655
5656/// The `<caption>` element - represents the title of a table.
5657///
5658/// # Purpose
5659///
5660/// The `<caption>` element provides a title or caption for its parent `<table>`. It gives
5661/// users context about the table's content before they start reading the data. Must be the
5662/// first child of the table if present. Screen readers announce captions to help users
5663/// understand table purpose.
5664///
5665/// # Content Categories
5666///
5667/// - None (only valid as first child of `<table>`)
5668///
5669/// # Permitted Content Model
5670///
5671/// - Flow content (excluding table elements)
5672///
5673/// # Common Use Cases
5674///
5675/// - Providing descriptive titles for data tables
5676/// - Summarizing table content and purpose
5677/// - Adding context for screen reader users
5678/// - Labeling financial reports and statistics
5679/// - Titling comparison and pricing tables
5680///
5681/// # Key Attributes
5682///
5683/// - Global attributes only
5684///
5685/// # Example
5686///
5687/// ```html
5688/// <!-- Simple caption -->
5689/// <table>
5690///   <caption>Employee Directory</caption>
5691///   <thead>
5692///     <tr>
5693///       <th>Name</th>
5694///       <th>Department</th>
5695///       <th>Email</th>
5696///     </tr>
5697///   </thead>
5698///   <tbody>
5699///     <tr>
5700///       <td>John Doe</td>
5701///       <td>Engineering</td>
5702///       <td>john@example.com</td>
5703///     </tr>
5704///   </tbody>
5705/// </table>
5706///
5707/// <!-- Caption with additional context -->
5708/// <table>
5709///   <caption>
5710///     <strong>Quarterly Sales Data</strong>
5711///     <br>
5712///     <small>Fiscal Year 2024</small>
5713///   </caption>
5714///   <thead>
5715///     <tr>
5716///       <th>Quarter</th>
5717///       <th>Sales</th>
5718///     </tr>
5719///   </thead>
5720///   <tbody>
5721///     <tr>
5722///       <td>Q1</td>
5723///       <td>$50,000</td>
5724///     </tr>
5725///   </tbody>
5726/// </table>
5727///
5728/// <!-- Styled caption -->
5729/// <table>
5730///   <caption style="caption-side: bottom;">
5731///     Table 1: Customer satisfaction ratings by region
5732///   </caption>
5733///   <thead>
5734///     <tr>
5735///       <th>Region</th>
5736///       <th>Rating</th>
5737///     </tr>
5738///   </thead>
5739///   <tbody>
5740///     <tr>
5741///       <td>North</td>
5742///       <td>4.5/5</td>
5743///     </tr>
5744///   </tbody>
5745/// </table>
5746/// ```
5747///
5748/// # Accessibility
5749///
5750/// - Always provide a caption for data tables
5751/// - Keep captions concise but descriptive
5752/// - Screen readers announce captions before table content
5753/// - Use CSS `caption-side` property for visual positioning
5754///
5755/// # WHATWG Specification
5756///
5757/// - [4.9.2 The caption element](https://html.spec.whatwg.org/multipage/tables.html#the-caption-element)
5758pub struct Caption;
5759impl HtmlElement for Caption {
5760    const TAG: &'static str = "caption";
5761}
5762
5763/// The `<colgroup>` element - defines a group of columns in a table.
5764///
5765/// # Purpose
5766///
5767/// The `<colgroup>` element specifies a group of one or more columns in a table for formatting
5768/// purposes. It allows styling of entire columns without repeating styles on each cell. Can
5769/// contain `<col>` elements or use the `span` attribute to define column groups.
5770///
5771/// # Content Categories
5772///
5773/// - None (only valid within `<table>`, after `<caption>` and before table rows)
5774///
5775/// # Permitted Content Model
5776///
5777/// - If `span` attribute is present: empty
5778/// - Otherwise: zero or more `<col>` elements
5779///
5780/// # Common Use Cases
5781///
5782/// - Styling multiple columns with shared characteristics
5783/// - Grouping related columns semantically
5784/// - Setting widths for multiple columns at once
5785/// - Applying background colors to column groups
5786/// - Defining visibility for column groups
5787///
5788/// # Key Attributes
5789///
5790/// - `span`: Number of columns the group spans (if no `<col>` children)
5791///
5792/// # Example
5793///
5794/// ```html
5795/// <!-- Column group with span -->
5796/// <table>
5797///   <colgroup span="2" class="financial-data"></colgroup>
5798///   <colgroup></colgroup>
5799///   <thead>
5800///     <tr>
5801///       <th>Item</th>
5802///       <th>Price</th>
5803///       <th>Stock</th>
5804///     </tr>
5805///   </thead>
5806/// </table>
5807///
5808/// <!-- Column group with col elements -->
5809/// <table>
5810///   <colgroup>
5811///     <col class="name-col">
5812///     <col class="email-col">
5813///   </colgroup>
5814///   <colgroup>
5815///     <col class="role-col">
5816///   </colgroup>
5817///   <thead>
5818///     <tr>
5819///       <th>Name</th>
5820///       <th>Email</th>
5821///       <th>Role</th>
5822///     </tr>
5823///   </thead>
5824/// </table>
5825///
5826/// <!-- Styling column groups -->
5827/// <table>
5828///   <colgroup>
5829///     <col>
5830///   </colgroup>
5831///   <colgroup class="highlight">
5832///     <col span="2">
5833///   </colgroup>
5834///   <thead>
5835///     <tr>
5836///       <th>Product</th>
5837///       <th>Q1</th>
5838///       <th>Q2</th>
5839///     </tr>
5840///   </thead>
5841/// </table>
5842/// ```
5843///
5844/// # WHATWG Specification
5845///
5846/// - [4.9.3 The colgroup element](https://html.spec.whatwg.org/multipage/tables.html#the-colgroup-element)
5847pub struct Colgroup;
5848impl HtmlElement for Colgroup {
5849    const TAG: &'static str = "colgroup";
5850}
5851
5852/// The `<col>` element - defines a column within a table.
5853///
5854/// # Purpose
5855///
5856/// The `<col>` element defines a column or a group of columns within a table. Used inside
5857/// `<colgroup>` to apply attributes and styles to entire columns without affecting individual
5858/// cells. Provides a way to style columns collectively.
5859///
5860/// # Content Categories
5861///
5862/// - None (only valid within `<colgroup>`)
5863///
5864/// # Permitted Content Model
5865///
5866/// - None (void element)
5867///
5868/// # Common Use Cases
5869///
5870/// - Setting column widths
5871/// - Applying styles to specific columns
5872/// - Defining visibility for individual columns
5873/// - Grouping columns with shared formatting
5874/// - Creating alternating column styles
5875///
5876/// # Key Attributes
5877///
5878/// - `span`: Number of consecutive columns this element represents (default: 1)
5879///
5880/// # Example
5881///
5882/// ```html
5883/// <!-- Individual column styling -->
5884/// <table>
5885///   <colgroup>
5886///     <col class="name-column">
5887///     <col class="data-column">
5888///     <col class="data-column">
5889///   </colgroup>
5890///   <thead>
5891///     <tr>
5892///       <th>Name</th>
5893///       <th>Value 1</th>
5894///       <th>Value 2</th>
5895///     </tr>
5896///   </thead>
5897/// </table>
5898///
5899/// <!-- Using span attribute -->
5900/// <table>
5901///   <colgroup>
5902///     <col>
5903///     <col span="2" class="numeric-columns">
5904///     <col>
5905///   </colgroup>
5906///   <thead>
5907///     <tr>
5908///       <th>Product</th>
5909///       <th>Price</th>
5910///       <th>Quantity</th>
5911///       <th>Notes</th>
5912///     </tr>
5913///   </thead>
5914/// </table>
5915///
5916/// <!-- Column widths -->
5917/// <table>
5918///   <colgroup>
5919///     <col style="width: 40%;">
5920///     <col style="width: 30%;">
5921///     <col style="width: 30%;">
5922///   </colgroup>
5923///   <thead>
5924///     <tr>
5925///       <th>Description</th>
5926///       <th>Category</th>
5927///       <th>Status</th>
5928///     </tr>
5929///   </thead>
5930/// </table>
5931/// ```
5932///
5933/// # WHATWG Specification
5934///
5935/// - [4.9.4 The col element](https://html.spec.whatwg.org/multipage/tables.html#the-col-element)
5936pub struct Col;
5937impl HtmlElement for Col {
5938    const TAG: &'static str = "col";
5939    const VOID: bool = true;
5940}
5941
5942/// The `<thead>` element - groups header rows in a table.
5943///
5944/// # Purpose
5945///
5946/// The `<thead>` element groups one or more `<tr>` elements that contain table headers.
5947/// It defines the header section of a table, typically containing column labels. Browsers
5948/// can use this to enable scrolling of the table body independently of the header, and to
5949/// repeat headers when printing multi-page tables.
5950///
5951/// # Content Categories
5952///
5953/// - None (only valid within `<table>`)
5954///
5955/// # Permitted Content Model
5956///
5957/// - Zero or more `<tr>` elements
5958///
5959/// # Common Use Cases
5960///
5961/// - Defining column headers for tables
5962/// - Creating sticky headers that remain visible while scrolling
5963/// - Enabling header repetition in printed tables
5964/// - Semantically separating headers from data
5965/// - Styling table headers distinctly from data
5966///
5967/// # Key Attributes
5968///
5969/// - Global attributes only
5970///
5971/// # Example
5972///
5973/// ```html
5974/// <!-- Basic table header -->
5975/// <table>
5976///   <thead>
5977///     <tr>
5978///       <th>Name</th>
5979///       <th>Email</th>
5980///       <th>Role</th>
5981///     </tr>
5982///   </thead>
5983///   <tbody>
5984///     <tr>
5985///       <td>John Doe</td>
5986///       <td>john@example.com</td>
5987///       <td>Developer</td>
5988///     </tr>
5989///   </tbody>
5990/// </table>
5991///
5992/// <!-- Multi-row header -->
5993/// <table>
5994///   <thead>
5995///     <tr>
5996///       <th rowspan="2">Name</th>
5997///       <th colspan="2">Contact</th>
5998///     </tr>
5999///     <tr>
6000///       <th>Email</th>
6001///       <th>Phone</th>
6002///     </tr>
6003///   </thead>
6004///   <tbody>
6005///     <tr>
6006///       <td>Alice</td>
6007///       <td>alice@example.com</td>
6008///       <td>555-0001</td>
6009///     </tr>
6010///   </tbody>
6011/// </table>
6012///
6013/// <!-- Sticky header -->
6014/// <table>
6015///   <thead style="position: sticky; top: 0; background: white;">
6016///     <tr>
6017///       <th>Product</th>
6018///       <th>Price</th>
6019///       <th>Stock</th>
6020///     </tr>
6021///   </thead>
6022///   <tbody>
6023///     <tr>
6024///       <td>Widget</td>
6025///       <td>$10</td>
6026///       <td>50</td>
6027///     </tr>
6028///     <!-- Many more rows... -->
6029///   </tbody>
6030/// </table>
6031/// ```
6032///
6033/// # Accessibility
6034///
6035/// - Use `<th>` elements within `<thead>` for proper header semantics
6036/// - Add `scope` attributes to header cells for complex tables
6037/// - Ensure header text is descriptive and concise
6038///
6039/// # WHATWG Specification
6040///
6041/// - [4.9.6 The thead element](https://html.spec.whatwg.org/multipage/tables.html#the-thead-element)
6042pub struct Thead;
6043impl HtmlElement for Thead {
6044    const TAG: &'static str = "thead";
6045}
6046
6047/// The `<tbody>` element - groups body content rows in a table.
6048///
6049/// # Purpose
6050///
6051/// The `<tbody>` element groups one or more `<tr>` elements as the body section of a table.
6052/// It represents the main data content, as opposed to headers (`<thead>`) and footers (`<tfoot>`).
6053/// Allows applying styles and behavior to the table body separately from headers and footers.
6054///
6055/// # Content Categories
6056///
6057/// - None (only valid within `<table>`)
6058///
6059/// # Permitted Content Model
6060///
6061/// - Zero or more `<tr>` elements
6062///
6063/// # Common Use Cases
6064///
6065/// - Separating table data from headers and footers
6066/// - Applying styles to the table body
6067/// - Enabling independent scrolling of table body
6068/// - Grouping data rows semantically
6069/// - Creating multiple body sections in complex tables
6070///
6071/// # Key Attributes
6072///
6073/// - Global attributes only
6074///
6075/// # Example
6076///
6077/// ```html
6078/// <!-- Basic table body -->
6079/// <table>
6080///   <thead>
6081///     <tr>
6082///       <th>Name</th>
6083///       <th>Age</th>
6084///     </tr>
6085///   </thead>
6086///   <tbody>
6087///     <tr>
6088///       <td>Alice</td>
6089///       <td>30</td>
6090///     </tr>
6091///     <tr>
6092///       <td>Bob</td>
6093///       <td>25</td>
6094///     </tr>
6095///   </tbody>
6096/// </table>
6097///
6098/// <!-- Multiple tbody sections -->
6099/// <table>
6100///   <thead>
6101///     <tr>
6102///       <th>Product</th>
6103///       <th>Price</th>
6104///     </tr>
6105///   </thead>
6106///   <tbody>
6107///     <tr>
6108///       <td colspan="2"><strong>Electronics</strong></td>
6109///     </tr>
6110///     <tr>
6111///       <td>Laptop</td>
6112///       <td>$999</td>
6113///     </tr>
6114///   </tbody>
6115///   <tbody>
6116///     <tr>
6117///       <td colspan="2"><strong>Clothing</strong></td>
6118///     </tr>
6119///     <tr>
6120///       <td>T-Shirt</td>
6121///       <td>$20</td>
6122///     </tr>
6123///   </tbody>
6124/// </table>
6125///
6126/// <!-- Scrollable table body -->
6127/// <table>
6128///   <thead>
6129///     <tr>
6130///       <th>Date</th>
6131///       <th>Event</th>
6132///     </tr>
6133///   </thead>
6134///   <tbody style="display: block; max-height: 200px; overflow-y: scroll;">
6135///     <tr>
6136///       <td>2024-01-01</td>
6137///       <td>New Year</td>
6138///     </tr>
6139///     <!-- More rows... -->
6140///   </tbody>
6141/// </table>
6142/// ```
6143///
6144/// # WHATWG Specification
6145///
6146/// - [4.9.5 The tbody element](https://html.spec.whatwg.org/multipage/tables.html#the-tbody-element)
6147pub struct Tbody;
6148impl HtmlElement for Tbody {
6149    const TAG: &'static str = "tbody";
6150}
6151
6152/// The `<tfoot>` element - groups footer rows in a table.
6153///
6154/// # Purpose
6155///
6156/// The `<tfoot>` element groups one or more `<tr>` elements that contain summary or footer
6157/// information for a table. Typically contains totals, summaries, or additional notes.
6158/// Like `<thead>`, it can be repeated when printing multi-page tables and can remain visible
6159/// during scrolling.
6160///
6161/// # Content Categories
6162///
6163/// - None (only valid within `<table>`)
6164///
6165/// # Permitted Content Model
6166///
6167/// - Zero or more `<tr>` elements
6168///
6169/// # Common Use Cases
6170///
6171/// - Displaying totals and summary calculations
6172/// - Adding footnotes or additional context
6173/// - Showing aggregate data for table columns
6174/// - Creating sticky footers for scrollable tables
6175/// - Providing supplementary information
6176///
6177/// # Key Attributes
6178///
6179/// - Global attributes only
6180///
6181/// # Example
6182///
6183/// ```html
6184/// <!-- Table with totals footer -->
6185/// <table>
6186///   <thead>
6187///     <tr>
6188///       <th>Item</th>
6189///       <th>Quantity</th>
6190///       <th>Price</th>
6191///     </tr>
6192///   </thead>
6193///   <tbody>
6194///     <tr>
6195///       <td>Widget</td>
6196///       <td>5</td>
6197///       <td>$50</td>
6198///     </tr>
6199///     <tr>
6200///       <td>Gadget</td>
6201///       <td>3</td>
6202///       <td>$45</td>
6203///     </tr>
6204///   </tbody>
6205///   <tfoot>
6206///     <tr>
6207///       <th>Total</th>
6208///       <td>8</td>
6209///       <td>$95</td>
6210///     </tr>
6211///   </tfoot>
6212/// </table>
6213///
6214/// <!-- Footer with notes -->
6215/// <table>
6216///   <thead>
6217///     <tr>
6218///       <th>Product</th>
6219///       <th>Status</th>
6220///     </tr>
6221///   </thead>
6222///   <tbody>
6223///     <tr>
6224///       <td>Alpha</td>
6225///       <td>Available</td>
6226///     </tr>
6227///   </tbody>
6228///   <tfoot>
6229///     <tr>
6230///       <td colspan="2">
6231///         <small>* Prices subject to change</small>
6232///       </td>
6233///     </tr>
6234///   </tfoot>
6235/// </table>
6236///
6237/// <!-- Multiple footer rows -->
6238/// <table>
6239///   <thead>
6240///     <tr>
6241///       <th>Category</th>
6242///       <th>Amount</th>
6243///     </tr>
6244///   </thead>
6245///   <tbody>
6246///     <tr>
6247///       <td>Sales</td>
6248///       <td>$100,000</td>
6249///     </tr>
6250///   </tbody>
6251///   <tfoot>
6252///     <tr>
6253///       <th>Subtotal</th>
6254///       <td>$100,000</td>
6255///     </tr>
6256///     <tr>
6257///       <th>Tax (10%)</th>
6258///       <td>$10,000</td>
6259///     </tr>
6260///     <tr>
6261///       <th>Total</th>
6262///       <td>$110,000</td>
6263///     </tr>
6264///   </tfoot>
6265/// </table>
6266/// ```
6267///
6268/// # WHATWG Specification
6269///
6270/// - [4.9.7 The tfoot element](https://html.spec.whatwg.org/multipage/tables.html#the-tfoot-element)
6271pub struct Tfoot;
6272impl HtmlElement for Tfoot {
6273    const TAG: &'static str = "tfoot";
6274}
6275
6276/// The `<tr>` element - defines a row of cells in a table.
6277///
6278/// # Purpose
6279///
6280/// The `<tr>` element represents a row of cells in a table. Each row contains one or more
6281/// `<th>` (header cell) or `<td>` (data cell) elements. Rows can be grouped within `<thead>`,
6282/// `<tbody>`, and `<tfoot>` elements for semantic structure.
6283///
6284/// # Content Categories
6285///
6286/// - None (only valid within `<table>`, `<thead>`, `<tbody>`, or `<tfoot>`)
6287///
6288/// # Permitted Content Model
6289///
6290/// - Zero or more `<td>` or `<th>` elements
6291/// - Optionally intermixed with script-supporting elements
6292///
6293/// # Common Use Cases
6294///
6295/// - Creating rows of data in tables
6296/// - Organizing tabular information horizontally
6297/// - Building spreadsheet-like structures
6298/// - Displaying lists of records
6299/// - Creating pricing and comparison tables
6300///
6301/// # Key Attributes
6302///
6303/// - Global attributes only
6304///
6305/// # Example
6306///
6307/// ```html
6308/// <!-- Basic table rows -->
6309/// <table>
6310///   <thead>
6311///     <tr>
6312///       <th>Name</th>
6313///       <th>Age</th>
6314///       <th>City</th>
6315///     </tr>
6316///   </thead>
6317///   <tbody>
6318///     <tr>
6319///       <td>Alice</td>
6320///       <td>30</td>
6321///       <td>New York</td>
6322///     </tr>
6323///     <tr>
6324///       <td>Bob</td>
6325///       <td>25</td>
6326///       <td>San Francisco</td>
6327///     </tr>
6328///   </tbody>
6329/// </table>
6330///
6331/// <!-- Row with mixed headers and data -->
6332/// <table>
6333///   <tbody>
6334///     <tr>
6335///       <th scope="row">Product A</th>
6336///       <td>$99</td>
6337///       <td>In Stock</td>
6338///     </tr>
6339///     <tr>
6340///       <th scope="row">Product B</th>
6341///       <td>$149</td>
6342///       <td>Out of Stock</td>
6343///     </tr>
6344///   </tbody>
6345/// </table>
6346///
6347/// <!-- Row with colspan -->
6348/// <table>
6349///   <tr>
6350///     <td colspan="3">Full width cell</td>
6351///   </tr>
6352///   <tr>
6353///     <td>Cell 1</td>
6354///     <td>Cell 2</td>
6355///     <td>Cell 3</td>
6356///   </tr>
6357/// </table>
6358///
6359/// <!-- Alternating row styles -->
6360/// <table>
6361///   <tbody>
6362///     <tr class="odd">
6363///       <td>Row 1</td>
6364///       <td>Data</td>
6365///     </tr>
6366///     <tr class="even">
6367///       <td>Row 2</td>
6368///       <td>Data</td>
6369///     </tr>
6370///   </tbody>
6371/// </table>
6372/// ```
6373///
6374/// # WHATWG Specification
6375///
6376/// - [4.9.8 The tr element](https://html.spec.whatwg.org/multipage/tables.html#the-tr-element)
6377pub struct Tr;
6378impl HtmlElement for Tr {
6379    const TAG: &'static str = "tr";
6380}
6381
6382/// The `<th>` element - defines a header cell in a table.
6383///
6384/// # Purpose
6385///
6386/// The `<th>` element represents a header cell in a table. It labels a row or column of data
6387/// cells, providing context for the information in the table. Header cells are typically
6388/// rendered with bold, centered text by default and are crucial for table accessibility.
6389///
6390/// # Content Categories
6391///
6392/// - None (only valid within `<tr>`)
6393///
6394/// # Permitted Content Model
6395///
6396/// - Flow content (excluding header, footer, sectioning content, and heading content)
6397///
6398/// # Common Use Cases
6399///
6400/// - Labeling table columns
6401/// - Labeling table rows
6402/// - Creating multi-level headers with rowspan/colspan
6403/// - Providing context for data cells
6404/// - Improving table accessibility for screen readers
6405///
6406/// # Key Attributes
6407///
6408/// - `scope`: Specifies cells the header relates to ("row", "col", "rowgroup", "colgroup")
6409/// - `colspan`: Number of columns the header spans
6410/// - `rowspan`: Number of rows the header spans
6411/// - `headers`: Space-separated list of other header cell IDs
6412/// - `abbr`: Abbreviated description of the header
6413///
6414/// # Example
6415///
6416/// ```html
6417/// <!-- Column headers -->
6418/// <table>
6419///   <thead>
6420///     <tr>
6421///       <th scope="col">Name</th>
6422///       <th scope="col">Email</th>
6423///       <th scope="col">Role</th>
6424///     </tr>
6425///   </thead>
6426///   <tbody>
6427///     <tr>
6428///       <td>Alice</td>
6429///       <td>alice@example.com</td>
6430///       <td>Developer</td>
6431///     </tr>
6432///   </tbody>
6433/// </table>
6434///
6435/// <!-- Row headers -->
6436/// <table>
6437///   <tbody>
6438///     <tr>
6439///       <th scope="row">Product A</th>
6440///       <td>$99</td>
6441///       <td>In Stock</td>
6442///     </tr>
6443///     <tr>
6444///       <th scope="row">Product B</th>
6445///       <td>$149</td>
6446///       <td>Out of Stock</td>
6447///     </tr>
6448///   </tbody>
6449/// </table>
6450///
6451/// <!-- Multi-level headers -->
6452/// <table>
6453///   <thead>
6454///     <tr>
6455///       <th rowspan="2" scope="col">Name</th>
6456///       <th colspan="2" scope="colgroup">Scores</th>
6457///     </tr>
6458///     <tr>
6459///       <th scope="col">Math</th>
6460///       <th scope="col">Science</th>
6461///     </tr>
6462///   </thead>
6463///   <tbody>
6464///     <tr>
6465///       <th scope="row">Alice</th>
6466///       <td>95</td>
6467///       <td>92</td>
6468///     </tr>
6469///   </tbody>
6470/// </table>
6471///
6472/// <!-- Headers with abbreviations -->
6473/// <table>
6474///   <thead>
6475///     <tr>
6476///       <th scope="col" abbr="Temp">Temperature (°F)</th>
6477///       <th scope="col" abbr="Humid">Humidity (%)</th>
6478///     </tr>
6479///   </thead>
6480///   <tbody>
6481///     <tr>
6482///       <td>72</td>
6483///       <td>65</td>
6484///     </tr>
6485///   </tbody>
6486/// </table>
6487/// ```
6488///
6489/// # Accessibility
6490///
6491/// - Always use `scope` attribute to clarify what the header labels
6492/// - Use "col" for column headers, "row" for row headers
6493/// - Use "colgroup" or "rowgroup" for headers spanning groups
6494/// - Provide `abbr` for long header text to aid screen readers
6495/// - Ensure header text is concise and descriptive
6496///
6497/// # WHATWG Specification
6498///
6499/// - [4.9.10 The th element](https://html.spec.whatwg.org/multipage/tables.html#the-th-element)
6500pub struct Th;
6501impl HtmlElement for Th {
6502    const TAG: &'static str = "th";
6503}
6504
6505/// The `<td>` element - defines a data cell in a table.
6506///
6507/// # Purpose
6508///
6509/// The `<td>` element represents a data cell in a table. It contains the actual data values
6510/// within table rows. Can span multiple rows or columns using `rowspan` and `colspan` attributes.
6511/// Distinguished from `<th>` header cells which label data.
6512///
6513/// # Content Categories
6514///
6515/// - Sectioning Root
6516///
6517/// # Permitted Content Model
6518///
6519/// - Flow content
6520///
6521/// # Common Use Cases
6522///
6523/// - Displaying data values in tables
6524/// - Creating spreadsheet cells
6525/// - Showing individual records in datasets
6526/// - Building data grids and matrices
6527/// - Presenting structured information
6528///
6529/// # Key Attributes
6530///
6531/// - `colspan`: Number of columns the cell spans
6532/// - `rowspan`: Number of rows the cell spans
6533/// - `headers`: Space-separated list of header cell IDs this cell relates to
6534///
6535/// # Example
6536///
6537/// ```html
6538/// <!-- Basic data cells -->
6539/// <table>
6540///   <tr>
6541///     <th>Name</th>
6542///     <th>Score</th>
6543///   </tr>
6544///   <tr>
6545///     <td>Alice</td>
6546///     <td>95</td>
6547///   </tr>
6548///   <tr>
6549///     <td>Bob</td>
6550///     <td>87</td>
6551///   </tr>
6552/// </table>
6553///
6554/// <!-- Cells with colspan -->
6555/// <table>
6556///   <tr>
6557///     <td colspan="2">This cell spans two columns</td>
6558///   </tr>
6559///   <tr>
6560///     <td>Column 1</td>
6561///     <td>Column 2</td>
6562///   </tr>
6563/// </table>
6564///
6565/// <!-- Cells with rowspan -->
6566/// <table>
6567///   <tr>
6568///     <td rowspan="2">Spans 2 rows</td>
6569///     <td>Row 1, Col 2</td>
6570///   </tr>
6571///   <tr>
6572///     <td>Row 2, Col 2</td>
6573///   </tr>
6574/// </table>
6575///
6576/// <!-- Complex table with headers attribute -->
6577/// <table>
6578///   <thead>
6579///     <tr>
6580///       <th id="name">Name</th>
6581///       <th id="math">Math</th>
6582///       <th id="science">Science</th>
6583///     </tr>
6584///   </thead>
6585///   <tbody>
6586///     <tr>
6587///       <th id="alice">Alice</th>
6588///       <td headers="alice math">95</td>
6589///       <td headers="alice science">92</td>
6590///     </tr>
6591///   </tbody>
6592/// </table>
6593///
6594/// <!-- Rich content in cells -->
6595/// <table>
6596///   <tr>
6597///     <td>
6598///       <strong>Product Name</strong><br>
6599///       <small>SKU: 12345</small>
6600///     </td>
6601///     <td>
6602///       <a href="/details">View Details</a>
6603///     </td>
6604///   </tr>
6605/// </table>
6606/// ```
6607///
6608/// # Accessibility
6609///
6610/// - Use `headers` attribute to associate cells with headers in complex tables
6611/// - Ensure data cells are properly associated with their headers
6612/// - Keep cell content concise and scannable
6613/// - Use `scope` on header cells to clarify relationships
6614///
6615/// # WHATWG Specification
6616///
6617/// - [4.9.9 The td element](https://html.spec.whatwg.org/multipage/tables.html#the-td-element)
6618pub struct Td;
6619impl HtmlElement for Td {
6620    const TAG: &'static str = "td";
6621}
6622
6623// =============================================================================
6624// Forms
6625// =============================================================================
6626
6627/// The `<form>` element - represents a document section containing interactive controls for submitting information.
6628///
6629/// # Purpose
6630///
6631/// The `<form>` element represents a collection of form-associated elements for gathering
6632/// user input and submitting data to a server. It provides the context for form controls,
6633/// handles submission, and defines how data should be encoded and transmitted.
6634///
6635/// # Content Categories
6636///
6637/// - Flow Content
6638/// - Palpable Content
6639///
6640/// # Permitted Content Model
6641///
6642/// - Flow content (but no nested `<form>` elements)
6643///
6644/// # Common Use Cases
6645///
6646/// - User registration and login forms
6647/// - Search interfaces
6648/// - Contact and feedback forms
6649/// - E-commerce checkout processes
6650/// - Survey and questionnaire forms
6651///
6652/// # Key Attributes
6653///
6654/// - `action`: URL where form data is sent
6655/// - `method`: HTTP method for submission ("get" or "post")
6656/// - `enctype`: Encoding type for form data ("application/x-www-form-urlencoded", "multipart/form-data", "text/plain")
6657/// - `name`: Name of the form
6658/// - `target`: Browsing context for response ("_self", "_blank", "_parent", "_top")
6659/// - `novalidate`: Disable built-in validation
6660/// - `autocomplete`: Enable/disable autocomplete ("on" or "off")
6661/// - `accept-charset`: Character encodings for submission
6662///
6663/// # Example
6664///
6665/// ```html
6666/// <!-- Basic login form -->
6667/// <form action="/login" method="post">
6668///   <label for="username">Username:</label>
6669///   <input type="text" id="username" name="username" required>
6670///   
6671///   <label for="password">Password:</label>
6672///   <input type="password" id="password" name="password" required>
6673///   
6674///   <button type="submit">Log In</button>
6675/// </form>
6676///
6677/// <!-- Search form with GET -->
6678/// <form action="/search" method="get" role="search">
6679///   <label for="q">Search:</label>
6680///   <input type="search" id="q" name="q" placeholder="Enter search terms">
6681///   <button type="submit">Search</button>
6682/// </form>
6683///
6684/// <!-- File upload form -->
6685/// <form action="/upload" method="post" enctype="multipart/form-data">
6686///   <label for="file">Choose file:</label>
6687///   <input type="file" id="file" name="file" required>
6688///   <button type="submit">Upload</button>
6689/// </form>
6690///
6691/// <!-- Form with validation disabled -->
6692/// <form action="/submit" method="post" novalidate>
6693///   <input type="email" name="email">
6694///   <button type="submit">Submit</button>
6695/// </form>
6696///
6697/// <!-- Form targeting new window -->
6698/// <form action="/external" method="post" target="_blank">
6699///   <input type="text" name="data">
6700///   <button type="submit">Open in New Tab</button>
6701/// </form>
6702/// ```
6703///
6704/// # Accessibility
6705///
6706/// - Use `<label>` elements for all form controls
6707/// - Group related fields with `<fieldset>` and `<legend>`
6708/// - Provide clear error messages near relevant fields
6709/// - Ensure logical tab order through form fields
6710/// - Use `autocomplete` attributes appropriately
6711/// - Add `aria-describedby` for additional instructions
6712///
6713/// # WHATWG Specification
6714///
6715/// - [4.10.3 The form element](https://html.spec.whatwg.org/multipage/forms.html#the-form-element)
6716pub struct Form;
6717impl HtmlElement for Form {
6718    const TAG: &'static str = "form";
6719}
6720impl FlowContent for Form {}
6721impl PalpableContent for Form {}
6722
6723/// The `<label>` element - represents a caption for a form control.
6724///
6725/// # Purpose
6726///
6727/// The `<label>` element provides a text label for a form control, creating an explicit
6728/// association between the label text and the control. Clicking the label activates the
6729/// associated control, improving usability and accessibility. Essential for screen readers
6730/// and assistive technologies.
6731///
6732/// # Content Categories
6733///
6734/// - Flow Content
6735/// - Phrasing Content
6736/// - Interactive Content
6737/// - Palpable Content
6738///
6739/// # Permitted Content Model
6740///
6741/// - Phrasing content (excluding other `<label>` elements and labelable elements other than the labeled control)
6742///
6743/// # Common Use Cases
6744///
6745/// - Labeling text inputs and textareas
6746/// - Labeling checkboxes and radio buttons
6747/// - Labeling select dropdowns
6748/// - Improving form accessibility
6749/// - Increasing click target area for form controls
6750///
6751/// # Key Attributes
6752///
6753/// - `for`: ID of the form control this label is associated with
6754///
6755/// # Example
6756///
6757/// ```html
6758/// <!-- Label with for attribute -->
6759/// <label for="username">Username:</label>
6760/// <input type="text" id="username" name="username">
6761///
6762/// <!-- Label wrapping input -->
6763/// <label>
6764///   Email:
6765///   <input type="email" name="email">
6766/// </label>
6767///
6768/// <!-- Checkbox with label -->
6769/// <input type="checkbox" id="terms" name="terms">
6770/// <label for="terms">I agree to the terms and conditions</label>
6771///
6772/// <!-- Radio buttons with labels -->
6773/// <fieldset>
6774///   <legend>Choose a size:</legend>
6775///   <input type="radio" id="small" name="size" value="small">
6776///   <label for="small">Small</label>
6777///   
6778///   <input type="radio" id="medium" name="size" value="medium">
6779///   <label for="medium">Medium</label>
6780///   
6781///   <input type="radio" id="large" name="size" value="large">
6782///   <label for="large">Large</label>
6783/// </fieldset>
6784///
6785/// <!-- Label with required indicator -->
6786/// <label for="email">
6787///   Email Address <abbr title="required" aria-label="required">*</abbr>
6788/// </label>
6789/// <input type="email" id="email" name="email" required>
6790///
6791/// <!-- Wrapping label for checkbox -->
6792/// <label>
6793///   <input type="checkbox" name="subscribe" value="yes">
6794///   Subscribe to newsletter
6795/// </label>
6796/// ```
6797///
6798/// # Accessibility
6799///
6800/// - Always associate labels with form controls using `for` attribute or wrapping
6801/// - Ensure label text is descriptive and concise
6802/// - Don't use placeholder text as a substitute for labels
6803/// - Use `aria-label` or `aria-labelledby` when visual labels aren't possible
6804/// - Indicate required fields clearly
6805/// - Avoid nesting interactive elements within labels
6806///
6807/// # WHATWG Specification
6808///
6809/// - [4.10.4 The label element](https://html.spec.whatwg.org/multipage/forms.html#the-label-element)
6810pub struct Label;
6811impl HtmlElement for Label {
6812    const TAG: &'static str = "label";
6813}
6814impl FlowContent for Label {}
6815impl PhrasingContent for Label {}
6816impl InteractiveContent for Label {}
6817impl PalpableContent for Label {}
6818
6819/// The `<input>` element - represents a typed data field for user input.
6820///
6821/// # Purpose
6822///
6823/// The `<input>` element is a versatile form control for collecting user input. Its behavior
6824/// and appearance vary dramatically based on the `type` attribute, ranging from text fields
6825/// to buttons, checkboxes, date pickers, and more. The most commonly used form element.
6826///
6827/// # Content Categories
6828///
6829/// - Flow Content
6830/// - Phrasing Content
6831/// - If `type` is not "hidden": Interactive Content
6832/// - Palpable Content
6833///
6834/// # Permitted Content Model
6835///
6836/// - None (void element)
6837///
6838/// # Common Use Cases
6839///
6840/// - Text and password input fields
6841/// - Checkboxes and radio buttons for selections
6842/// - File uploads
6843/// - Date, time, and color pickers
6844/// - Number and range sliders
6845///
6846/// # Key Attributes
6847///
6848/// - `type`: Input type (text, password, email, number, checkbox, radio, file, date, etc.)
6849/// - `name`: Name for form submission
6850/// - `value`: Current value of the control
6851/// - `placeholder`: Hint text displayed when empty
6852/// - `required`: Makes the field mandatory
6853/// - `disabled`: Disables the control
6854/// - `readonly`: Makes the field read-only
6855/// - `min`, `max`: Minimum and maximum values (for numeric/date types)
6856/// - `step`: Increment step (for numeric types)
6857/// - `pattern`: Regular expression for validation
6858/// - `autocomplete`: Autocomplete hint
6859/// - `multiple`: Allow multiple values (file, email)
6860/// - `accept`: File types to accept (for file inputs)
6861/// - `checked`: Pre-checked state (checkbox, radio)
6862///
6863/// # Example
6864///
6865/// ```html
6866/// <!-- Text input -->
6867/// <label for="name">Name:</label>
6868/// <input type="text" id="name" name="name" placeholder="Enter your name" required>
6869///
6870/// <!-- Email with validation -->
6871/// <label for="email">Email:</label>
6872/// <input type="email" id="email" name="email" placeholder="user@example.com" required>
6873///
6874/// <!-- Password field -->
6875/// <label for="pwd">Password:</label>
6876/// <input type="password" id="pwd" name="password" minlength="8" required>
6877///
6878/// <!-- Number with range -->
6879/// <label for="age">Age:</label>
6880/// <input type="number" id="age" name="age" min="18" max="120" step="1">
6881///
6882/// <!-- Checkbox -->
6883/// <input type="checkbox" id="subscribe" name="subscribe" value="yes" checked>
6884/// <label for="subscribe">Subscribe to newsletter</label>
6885///
6886/// <!-- Radio buttons -->
6887/// <input type="radio" id="color-red" name="color" value="red">
6888/// <label for="color-red">Red</label>
6889/// <input type="radio" id="color-blue" name="color" value="blue">
6890/// <label for="color-blue">Blue</label>
6891///
6892/// <!-- File upload -->
6893/// <label for="avatar">Profile picture:</label>
6894/// <input type="file" id="avatar" name="avatar" accept="image/*">
6895///
6896/// <!-- Date picker -->
6897/// <label for="dob">Date of birth:</label>
6898/// <input type="date" id="dob" name="dob" min="1900-01-01" max="2024-12-31">
6899///
6900/// <!-- Range slider -->
6901/// <label for="volume">Volume:</label>
6902/// <input type="range" id="volume" name="volume" min="0" max="100" value="50">
6903///
6904/// <!-- Search field -->
6905/// <input type="search" name="q" placeholder="Search..." autocomplete="off">
6906///
6907/// <!-- Color picker -->
6908/// <label for="color">Choose color:</label>
6909/// <input type="color" id="color" name="color" value="#ff0000">
6910/// ```
6911///
6912/// # Accessibility
6913///
6914/// - Always provide associated `<label>` elements
6915/// - Use appropriate `type` attribute for semantic meaning
6916/// - Provide helpful placeholder text (but don't rely on it alone)
6917/// - Use `aria-describedby` for additional instructions
6918/// - Ensure sufficient color contrast for visible inputs
6919/// - Make error messages clear and associated with inputs
6920/// - Use `autocomplete` for common fields
6921///
6922/// # WHATWG Specification
6923///
6924/// - [4.10.5 The input element](https://html.spec.whatwg.org/multipage/input.html#the-input-element)
6925pub struct Input;
6926impl HtmlElement for Input {
6927    const TAG: &'static str = "input";
6928    const VOID: bool = true;
6929}
6930impl FlowContent for Input {}
6931impl PhrasingContent for Input {}
6932impl InteractiveContent for Input {}
6933impl PalpableContent for Input {}
6934
6935/// The `<button>` element - represents a clickable button.
6936///
6937/// # Purpose
6938///
6939/// The `<button>` element represents a clickable button control. Unlike `<input type="button">`,
6940/// it can contain rich content like text, images, and other elements. Used for form submission,
6941/// resetting forms, or triggering custom JavaScript actions. More flexible and semantic than
6942/// input buttons.
6943///
6944/// # Content Categories
6945///
6946/// - Flow Content
6947/// - Phrasing Content
6948/// - Interactive Content
6949/// - Palpable Content
6950///
6951/// # Permitted Content Model
6952///
6953/// - Phrasing content (but no interactive content descendants)
6954///
6955/// # Common Use Cases
6956///
6957/// - Form submission buttons
6958/// - Form reset buttons
6959/// - Custom action buttons with JavaScript
6960/// - Toggle buttons for UI state changes
6961/// - Buttons with icons or complex content
6962///
6963/// # Key Attributes
6964///
6965/// - `type`: Button type ("submit", "reset", "button")
6966/// - `name`: Name for form submission
6967/// - `value`: Value sent with form submission
6968/// - `disabled`: Disables the button
6969/// - `form`: Associates with a form by ID
6970/// - `formaction`: Override form's action URL
6971/// - `formmethod`: Override form's method
6972/// - `formenctype`: Override form's encoding type
6973/// - `formnovalidate`: Override form's validation
6974/// - `formtarget`: Override form's target
6975///
6976/// # Example
6977///
6978/// ```html
6979/// <!-- Submit button -->
6980/// <form action="/submit" method="post">
6981///   <input type="text" name="username">
6982///   <button type="submit">Submit</button>
6983/// </form>
6984///
6985/// <!-- Reset button -->
6986/// <form>
6987///   <input type="text" name="data">
6988///   <button type="reset">Reset Form</button>
6989/// </form>
6990///
6991/// <!-- Button with custom action -->
6992/// <button type="button" onclick="alert('Clicked!')">Click Me</button>
6993///
6994/// <!-- Button with icon -->
6995/// <button type="submit">
6996///   <svg width="16" height="16">
6997///     <path d="M8 0l8 8-8 8-8-8z"/>
6998///   </svg>
6999///   Submit Form
7000/// </button>
7001///
7002/// <!-- Disabled button -->
7003/// <button type="submit" disabled>Please wait...</button>
7004///
7005/// <!-- Button overriding form attributes -->
7006/// <form action="/default" method="post">
7007///   <input type="text" name="data">
7008///   <button type="submit">Normal Submit</button>
7009///   <button type="submit" formaction="/alternative" formmethod="get">
7010///     Alternative Submit
7011///   </button>
7012/// </form>
7013///
7014/// <!-- Button associated with external form -->
7015/// <form id="myForm" action="/submit">
7016///   <input type="text" name="field">
7017/// </form>
7018/// <button type="submit" form="myForm">Submit External Form</button>
7019///
7020/// <!-- Delete button with confirmation -->
7021/// <button type="button" onclick="if(confirm('Delete?')) submit()">
7022///   Delete Item
7023/// </button>
7024/// ```
7025///
7026/// # Accessibility
7027///
7028/// - Use descriptive button text that explains the action
7029/// - Provide `aria-label` when button contains only an icon
7030/// - Use `type="button"` for non-submit actions to prevent accidental submission
7031/// - Ensure sufficient color contrast for button text
7032/// - Make buttons keyboard accessible (they are by default)
7033/// - Use `disabled` attribute to prevent interaction, not just CSS
7034/// - Provide visual feedback for button states (hover, active, disabled)
7035///
7036/// # WHATWG Specification
7037///
7038/// - [4.10.6 The button element](https://html.spec.whatwg.org/multipage/form-elements.html#the-button-element)
7039pub struct Button;
7040impl HtmlElement for Button {
7041    const TAG: &'static str = "button";
7042}
7043impl FlowContent for Button {}
7044impl PhrasingContent for Button {}
7045impl InteractiveContent for Button {}
7046impl PalpableContent for Button {}
7047
7048/// The `<select>` element - represents a control for selecting among a set of options.
7049///
7050/// # Purpose
7051///
7052/// The `<select>` element provides a dropdown list of options from which users can choose
7053/// one or more values. Contains `<option>` elements that define the available choices, and
7054/// can be grouped using `<optgroup>` elements. More compact than radio buttons for multiple
7055/// choices.
7056///
7057/// # Content Categories
7058///
7059/// - Flow Content
7060/// - Phrasing Content
7061/// - Interactive Content
7062/// - Palpable Content
7063///
7064/// # Permitted Content Model
7065///
7066/// - Zero or more `<option>` or `<optgroup>` elements
7067///
7068/// # Common Use Cases
7069///
7070/// - Country or state selection dropdowns
7071/// - Category or type selectors
7072/// - Quantity or size pickers
7073/// - Date component selectors (month, year)
7074/// - Multi-select lists for tags or categories
7075///
7076/// # Key Attributes
7077///
7078/// - `name`: Name for form submission
7079/// - `multiple`: Allow selecting multiple options
7080/// - `size`: Number of visible options
7081/// - `required`: Make selection mandatory
7082/// - `disabled`: Disable the entire select
7083/// - `autocomplete`: Autocomplete hint
7084/// - `form`: Associates with a form by ID
7085///
7086/// # Example
7087///
7088/// ```html
7089/// <!-- Basic dropdown -->
7090/// <label for="country">Country:</label>
7091/// <select id="country" name="country">
7092///   <option value="">Select a country</option>
7093///   <option value="us">United States</option>
7094///   <option value="uk">United Kingdom</option>
7095///   <option value="ca">Canada</option>
7096/// </select>
7097///
7098/// <!-- Select with pre-selected option -->
7099/// <label for="size">Size:</label>
7100/// <select id="size" name="size">
7101///   <option value="s">Small</option>
7102///   <option value="m" selected>Medium</option>
7103///   <option value="l">Large</option>
7104/// </select>
7105///
7106/// <!-- Multi-select -->
7107/// <label for="interests">Interests (select multiple):</label>
7108/// <select id="interests" name="interests" multiple size="4">
7109///   <option value="sports">Sports</option>
7110///   <option value="music">Music</option>
7111///   <option value="art">Art</option>
7112///   <option value="tech">Technology</option>
7113/// </select>
7114///
7115/// <!-- Grouped options -->
7116/// <label for="car">Choose a car:</label>
7117/// <select id="car" name="car">
7118///   <optgroup label="Swedish Cars">
7119///     <option value="volvo">Volvo</option>
7120///     <option value="saab">Saab</option>
7121///   </optgroup>
7122///   <optgroup label="German Cars">
7123///     <option value="mercedes">Mercedes</option>
7124///     <option value="audi">Audi</option>
7125///   </optgroup>
7126/// </select>
7127///
7128/// <!-- Required select with placeholder -->
7129/// <label for="department">Department:</label>
7130/// <select id="department" name="department" required>
7131///   <option value="" disabled selected>-- Choose department --</option>
7132///   <option value="sales">Sales</option>
7133///   <option value="engineering">Engineering</option>
7134///   <option value="support">Support</option>
7135/// </select>
7136///
7137/// <!-- Disabled select -->
7138/// <label for="status">Status:</label>
7139/// <select id="status" name="status" disabled>
7140///   <option>Processing</option>
7141/// </select>
7142/// ```
7143///
7144/// # Accessibility
7145///
7146/// - Always provide an associated `<label>`
7147/// - Use first option as a prompt/placeholder, not a valid choice
7148/// - Provide clear option text
7149/// - Group related options with `<optgroup>`
7150/// - For long lists, consider searchable alternatives
7151/// - Ensure keyboard navigation works properly
7152/// - Use `aria-describedby` for additional instructions
7153///
7154/// # WHATWG Specification
7155///
7156/// - [4.10.7 The select element](https://html.spec.whatwg.org/multipage/form-elements.html#the-select-element)
7157pub struct Select;
7158impl HtmlElement for Select {
7159    const TAG: &'static str = "select";
7160}
7161impl FlowContent for Select {}
7162impl PhrasingContent for Select {}
7163impl InteractiveContent for Select {}
7164impl PalpableContent for Select {}
7165
7166/// The `<datalist>` element - contains a set of predefined options for other controls.
7167///
7168/// # Purpose
7169///
7170/// The `<datalist>` element provides a list of predefined options for an `<input>` element.
7171/// It creates an autocomplete or suggestion feature where users can either select from the
7172/// list or type their own value. Offers flexibility between free-form input and selection.
7173///
7174/// # Content Categories
7175///
7176/// - Flow Content
7177/// - Phrasing Content
7178///
7179/// # Permitted Content Model
7180///
7181/// - Either: Phrasing content
7182/// - Or: Zero or more `<option>` elements
7183///
7184/// # Common Use Cases
7185///
7186/// - Autocomplete suggestions for text inputs
7187/// - Common value suggestions with custom input allowed
7188/// - Search suggestions
7189/// - Product or category suggestions
7190/// - Location or address suggestions
7191///
7192/// # Key Attributes
7193///
7194/// - `id`: ID referenced by input's `list` attribute (required)
7195///
7196/// # Example
7197///
7198/// ```html
7199/// <!-- Basic datalist for text input -->
7200/// <label for="browser">Choose a browser:</label>
7201/// <input list="browsers" id="browser" name="browser">
7202/// <datalist id="browsers">
7203///   <option value="Chrome">
7204///   <option value="Firefox">
7205///   <option value="Safari">
7206///   <option value="Edge">
7207/// </datalist>
7208///
7209/// <!-- Datalist with labels -->
7210/// <label for="ice-cream">Favorite ice cream:</label>
7211/// <input list="ice-cream-flavors" id="ice-cream" name="ice-cream">
7212/// <datalist id="ice-cream-flavors">
7213///   <option value="Chocolate">Rich chocolate</option>
7214///   <option value="Vanilla">Classic vanilla</option>
7215///   <option value="Strawberry">Fresh strawberry</option>
7216/// </datalist>
7217///
7218/// <!-- Datalist for email with common domains -->
7219/// <label for="email">Email:</label>
7220/// <input type="email" list="email-domains" id="email" name="email">
7221/// <datalist id="email-domains">
7222///   <option value="user@gmail.com">
7223///   <option value="user@yahoo.com">
7224///   <option value="user@outlook.com">
7225/// </datalist>
7226///
7227/// <!-- Datalist for search -->
7228/// <label for="search">Search:</label>
7229/// <input type="search" list="recent-searches" id="search" name="q">
7230/// <datalist id="recent-searches">
7231///   <option value="HTML tutorials">
7232///   <option value="CSS grid layout">
7233///   <option value="JavaScript async">
7234/// </datalist>
7235///
7236/// <!-- Datalist for URL input -->
7237/// <label for="website">Website:</label>
7238/// <input type="url" list="popular-sites" id="website" name="website">
7239/// <datalist id="popular-sites">
7240///   <option value="https://github.com">
7241///   <option value="https://stackoverflow.com">
7242///   <option value="https://developer.mozilla.org">
7243/// </datalist>
7244/// ```
7245///
7246/// # Accessibility
7247///
7248/// - Options are announced to screen readers as suggestions
7249/// - Users can still type custom values
7250/// - Works with standard input accessibility features
7251/// - Provide meaningful option values
7252///
7253/// # WHATWG Specification
7254///
7255/// - [4.10.8 The datalist element](https://html.spec.whatwg.org/multipage/form-elements.html#the-datalist-element)
7256pub struct Datalist;
7257impl HtmlElement for Datalist {
7258    const TAG: &'static str = "datalist";
7259}
7260impl FlowContent for Datalist {}
7261impl PhrasingContent for Datalist {}
7262
7263/// The `<optgroup>` element - groups related options within a `<select>` element.
7264///
7265/// # Purpose
7266///
7267/// The `<optgroup>` element groups related `<option>` elements within a `<select>` element.
7268/// Provides semantic grouping and visual separation of options, making long select lists
7269/// more organized and easier to navigate. Option groups are typically displayed with
7270/// indented options and a bold group label.
7271///
7272/// # Content Categories
7273///
7274/// - None (only valid within `<select>`)
7275///
7276/// # Permitted Content Model
7277///
7278/// - Zero or more `<option>` elements
7279///
7280/// # Common Use Cases
7281///
7282/// - Organizing countries by region
7283/// - Grouping products by category
7284/// - Categorizing options by type or brand
7285/// - Structuring hierarchical selections
7286/// - Improving navigation in long dropdown lists
7287///
7288/// # Key Attributes
7289///
7290/// - `label`: Name of the group (required)
7291/// - `disabled`: Disables all options in the group
7292///
7293/// # Example
7294///
7295/// ```html
7296/// <!-- Countries grouped by region -->
7297/// <label for="country">Select country:</label>
7298/// <select id="country" name="country">
7299///   <optgroup label="North America">
7300///     <option value="us">United States</option>
7301///     <option value="ca">Canada</option>
7302///     <option value="mx">Mexico</option>
7303///   </optgroup>
7304///   <optgroup label="Europe">
7305///     <option value="uk">United Kingdom</option>
7306///     <option value="de">Germany</option>
7307///     <option value="fr">France</option>
7308///   </optgroup>
7309///   <optgroup label="Asia">
7310///     <option value="jp">Japan</option>
7311///     <option value="cn">China</option>
7312///     <option value="in">India</option>
7313///   </optgroup>
7314/// </select>
7315///
7316/// <!-- Products by category -->
7317/// <label for="product">Choose product:</label>
7318/// <select id="product" name="product">
7319///   <optgroup label="Electronics">
7320///     <option value="laptop">Laptop</option>
7321///     <option value="phone">Smartphone</option>
7322///   </optgroup>
7323///   <optgroup label="Clothing">
7324///     <option value="shirt">T-Shirt</option>
7325///     <option value="jeans">Jeans</option>
7326///   </optgroup>
7327/// </select>
7328///
7329/// <!-- Disabled option group -->
7330/// <label for="service">Service level:</label>
7331/// <select id="service" name="service">
7332///   <optgroup label="Available">
7333///     <option value="basic">Basic</option>
7334///     <option value="standard">Standard</option>
7335///   </optgroup>
7336///   <optgroup label="Premium Options" disabled>
7337///     <option value="premium">Premium</option>
7338///     <option value="enterprise">Enterprise</option>
7339///   </optgroup>
7340/// </select>
7341///
7342/// <!-- Time zones grouped -->
7343/// <label for="timezone">Time zone:</label>
7344/// <select id="timezone" name="timezone">
7345///   <optgroup label="US Time Zones">
7346///     <option value="est">Eastern</option>
7347///     <option value="cst">Central</option>
7348///     <option value="pst">Pacific</option>
7349///   </optgroup>
7350///   <optgroup label="European Time Zones">
7351///     <option value="gmt">GMT</option>
7352///     <option value="cet">CET</option>
7353///   </optgroup>
7354/// </select>
7355/// ```
7356///
7357/// # Accessibility
7358///
7359/// - Group labels are announced by screen readers
7360/// - Helps users understand option organization
7361/// - Makes navigation easier in long lists
7362/// - Ensure group labels are descriptive
7363///
7364/// # WHATWG Specification
7365///
7366/// - [4.10.9 The optgroup element](https://html.spec.whatwg.org/multipage/form-elements.html#the-optgroup-element)
7367pub struct Optgroup;
7368impl HtmlElement for Optgroup {
7369    const TAG: &'static str = "optgroup";
7370}
7371
7372/// The `<option>` element - defines an option in a `<select>`, `<optgroup>`, or `<datalist>`.
7373///
7374/// # Purpose
7375///
7376/// The `<option>` element defines an individual option within a `<select>` element or
7377/// suggestions within a `<datalist>` element. Each option represents a value that users
7378/// can choose. The text content of the element is what users see, while the `value`
7379/// attribute is what gets submitted with the form.
7380///
7381/// # Content Categories
7382///
7383/// - None (only valid within `<select>`, `<optgroup>`, or `<datalist>`)
7384///
7385/// # Permitted Content Model
7386///
7387/// - Text content (if `label` attribute is present, text is ignored)
7388///
7389/// # Common Use Cases
7390///
7391/// - Dropdown menu choices
7392/// - Multi-select list items
7393/// - Autocomplete suggestions
7394/// - Combobox options
7395/// - Form selection values
7396///
7397/// # Key Attributes
7398///
7399/// - `value`: Value submitted with the form (defaults to text content if not specified)
7400/// - `selected`: Pre-selects this option
7401/// - `disabled`: Disables this option
7402/// - `label`: Alternative text for the option (overrides text content)
7403///
7404/// # Example
7405///
7406/// ```html
7407/// <!-- Basic options -->
7408/// <select name="color">
7409///   <option value="red">Red</option>
7410///   <option value="green">Green</option>
7411///   <option value="blue">Blue</option>
7412/// </select>
7413///
7414/// <!-- Option with selected attribute -->
7415/// <select name="size">
7416///   <option value="s">Small</option>
7417///   <option value="m" selected>Medium</option>
7418///   <option value="l">Large</option>
7419/// </select>
7420///
7421/// <!-- Disabled option -->
7422/// <select name="status">
7423///   <option value="">Select status</option>
7424///   <option value="active">Active</option>
7425///   <option value="inactive" disabled>Inactive (unavailable)</option>
7426/// </select>
7427///
7428/// <!-- Options with different display and value -->
7429/// <select name="country">
7430///   <option value="us">United States</option>
7431///   <option value="uk">United Kingdom</option>
7432///   <option value="ca">Canada</option>
7433/// </select>
7434///
7435/// <!-- Option with label attribute -->
7436/// <select name="product">
7437///   <option value="prod1" label="Premium Widget">Premium Widget - $99</option>
7438///   <option value="prod2" label="Basic Widget">Basic Widget - $49</option>
7439/// </select>
7440///
7441/// <!-- Options in datalist -->
7442/// <input list="browsers" name="browser">
7443/// <datalist id="browsers">
7444///   <option value="Chrome">Google Chrome</option>
7445///   <option value="Firefox">Mozilla Firefox</option>
7446///   <option value="Safari">Apple Safari</option>
7447/// </datalist>
7448///
7449/// <!-- Placeholder option -->
7450/// <select name="category" required>
7451///   <option value="" disabled selected>-- Select category --</option>
7452///   <option value="tech">Technology</option>
7453///   <option value="health">Health</option>
7454///   <option value="finance">Finance</option>
7455/// </select>
7456/// ```
7457///
7458/// # Accessibility
7459///
7460/// - Use clear, concise option text
7461/// - Ensure value attributes are meaningful
7462/// - Don't rely solely on color to distinguish options
7463/// - Use disabled attribute instead of hiding options when appropriate
7464/// - Provide a default/placeholder option for clarity
7465///
7466/// # WHATWG Specification
7467///
7468/// - [4.10.10 The option element](https://html.spec.whatwg.org/multipage/form-elements.html#the-option-element)
7469pub struct Option_;
7470impl HtmlElement for Option_ {
7471    const TAG: &'static str = "option";
7472}
7473
7474/// The `<textarea>` element - represents a multi-line plain text editing control.
7475///
7476/// # Purpose
7477///
7478/// The `<textarea>` element provides a multi-line text input control for entering larger
7479/// amounts of text. Unlike single-line `<input>` elements, textareas can contain multiple
7480/// lines and typically show scroll bars when content exceeds the visible area. Essential
7481/// for comments, descriptions, and longer form fields.
7482///
7483/// # Content Categories
7484///
7485/// - Flow Content
7486/// - Phrasing Content
7487/// - Interactive Content
7488/// - Palpable Content
7489///
7490/// # Permitted Content Model
7491///
7492/// - Text content (no child elements)
7493///
7494/// # Common Use Cases
7495///
7496/// - Comment and feedback forms
7497/// - Message composition areas
7498/// - Description and bio fields
7499/// - Code or text snippet input
7500/// - Notes and memo fields
7501///
7502/// # Key Attributes
7503///
7504/// - `name`: Name for form submission
7505/// - `rows`: Visible number of text lines
7506/// - `cols`: Visible width in average character widths
7507/// - `maxlength`: Maximum number of characters
7508/// - `minlength`: Minimum number of characters
7509/// - `placeholder`: Hint text when empty
7510/// - `required`: Makes the field mandatory
7511/// - `disabled`: Disables the control
7512/// - `readonly`: Makes the field read-only
7513/// - `autocomplete`: Autocomplete behavior
7514/// - `wrap`: Text wrapping behavior ("soft" or "hard")
7515/// - `spellcheck`: Enable spell checking
7516/// - `form`: Associates with a form by ID
7517///
7518/// # Example
7519///
7520/// ```html
7521/// <!-- Basic textarea -->
7522/// <label for="message">Message:</label>
7523/// <textarea id="message" name="message" rows="4" cols="50"></textarea>
7524///
7525/// <!-- Textarea with placeholder -->
7526/// <label for="comment">Comment:</label>
7527/// <textarea id="comment" name="comment" rows="5"
7528///           placeholder="Enter your comment here..."></textarea>
7529///
7530/// <!-- Textarea with default value -->
7531/// <label for="bio">Biography:</label>
7532/// <textarea id="bio" name="bio" rows="6" cols="60">
7533/// This is the default text that appears in the textarea.
7534/// It can span multiple lines.
7535/// </textarea>
7536///
7537/// <!-- Textarea with character limits -->
7538/// <label for="tweet">Tweet (280 characters max):</label>
7539/// <textarea id="tweet" name="tweet" rows="3" maxlength="280" required></textarea>
7540///
7541/// <!-- Readonly textarea -->
7542/// <label for="terms">Terms and Conditions:</label>
7543/// <textarea id="terms" rows="10" cols="80" readonly>
7544/// Lorem ipsum dolor sit amet, consectetur adipiscing elit.
7545/// These terms cannot be edited.
7546/// </textarea>
7547///
7548/// <!-- Textarea with hard wrap -->
7549/// <label for="email-body">Email body:</label>
7550/// <textarea id="email-body" name="body" rows="10" cols="72" wrap="hard"></textarea>
7551///
7552/// <!-- Disabled textarea -->
7553/// <label for="status">Status:</label>
7554/// <textarea id="status" rows="2" disabled>Processing...</textarea>
7555///
7556/// <!-- Textarea with spell check disabled -->
7557/// <label for="code">Code snippet:</label>
7558/// <textarea id="code" name="code" rows="8" spellcheck="false"
7559///           style="font-family: monospace;"></textarea>
7560/// ```
7561///
7562/// # Accessibility
7563///
7564/// - Always provide an associated `<label>`
7565/// - Use `aria-describedby` for additional instructions
7566/// - Provide clear character limits when applicable
7567/// - Ensure sufficient size for expected content
7568/// - Consider resize behavior for user control
7569/// - Use `placeholder` for hints, not instructions
7570/// - Ensure adequate color contrast
7571///
7572/// # WHATWG Specification
7573///
7574/// - [4.10.11 The textarea element](https://html.spec.whatwg.org/multipage/form-elements.html#the-textarea-element)
7575pub struct Textarea;
7576impl HtmlElement for Textarea {
7577    const TAG: &'static str = "textarea";
7578}
7579impl FlowContent for Textarea {}
7580impl PhrasingContent for Textarea {}
7581impl InteractiveContent for Textarea {}
7582impl PalpableContent for Textarea {}
7583
7584/// The `<output>` element - represents the result of a calculation or user action.
7585///
7586/// # Purpose
7587///
7588/// The `<output>` element represents the result of a calculation, user action, or the
7589/// outcome of a script execution. It's specifically designed to display computed values
7590/// and results, typically from form calculations or JavaScript operations. Different from
7591/// regular text in that it semantically indicates generated output.
7592///
7593/// # Content Categories
7594///
7595/// - Flow Content
7596/// - Phrasing Content
7597/// - Palpable Content
7598///
7599/// # Permitted Content Model
7600///
7601/// - Phrasing content
7602///
7603/// # Common Use Cases
7604///
7605/// - Displaying calculation results in forms
7606/// - Showing real-time computed values
7607/// - Range slider value displays
7608/// - Form validation feedback
7609/// - Shopping cart totals and summaries
7610///
7611/// # Key Attributes
7612///
7613/// - `for`: Space-separated list of IDs of elements that contributed to the calculation
7614/// - `form`: Associates with a form by ID
7615/// - `name`: Name for form submission
7616///
7617/// # Example
7618///
7619/// ```html
7620/// <!-- Calculator result -->
7621/// <form oninput="result.value = parseInt(a.value) + parseInt(b.value)">
7622///   <input type="number" id="a" value="0"> +
7623///   <input type="number" id="b" value="0"> =
7624///   <output name="result" for="a b">0</output>
7625/// </form>
7626///
7627/// <!-- Range slider value display -->
7628/// <label for="volume">Volume:</label>
7629/// <input type="range" id="volume" min="0" max="100" value="50"
7630///        oninput="volumeOutput.value = this.value">
7631/// <output id="volumeOutput" for="volume">50</output>
7632///
7633/// <!-- Price calculator -->
7634/// <form oninput="total.value = (quantity.value * 10).toFixed(2)">
7635///   <label for="quantity">Quantity:</label>
7636///   <input type="number" id="quantity" name="quantity" value="1" min="1">
7637///   <p>Price per item: $10.00</p>
7638///   <p>Total: $<output name="total" for="quantity">10.00</output></p>
7639/// </form>
7640///
7641/// <!-- BMI Calculator -->
7642/// <form oninput="bmi.value = (weight.value / ((height.value / 100) ** 2)).toFixed(1)">
7643///   <label for="weight">Weight (kg):</label>
7644///   <input type="number" id="weight" value="70">
7645///   
7646///   <label for="height">Height (cm):</label>
7647///   <input type="number" id="height" value="175">
7648///   
7649///   <p>BMI: <output name="bmi" for="weight height">22.9</output></p>
7650/// </form>
7651///
7652/// <!-- Form validation summary -->
7653/// <form>
7654///   <input type="email" id="email" required>
7655///   <output for="email" id="emailStatus"></output>
7656/// </form>
7657/// ```
7658///
7659/// # Accessibility
7660///
7661/// - Output values are announced by screen readers when changed
7662/// - Use `aria-live="polite"` for important dynamic updates
7663/// - Ensure output is clearly associated with input controls via `for` attribute
7664/// - Provide context for what the output represents
7665/// - Make output values visually distinct
7666///
7667/// # WHATWG Specification
7668///
7669/// - [4.10.12 The output element](https://html.spec.whatwg.org/multipage/form-elements.html#the-output-element)
7670pub struct Output;
7671impl HtmlElement for Output {
7672    const TAG: &'static str = "output";
7673}
7674impl FlowContent for Output {}
7675impl PhrasingContent for Output {}
7676impl PalpableContent for Output {}
7677
7678/// The `<progress>` element - represents the completion progress of a task.
7679///
7680/// # Purpose
7681///
7682/// The `<progress>` element displays the progress of a task, such as a file upload, download,
7683/// or form completion. Shows a progress bar indicating how much of the task has been completed.
7684/// Can represent both determinate (known total) and indeterminate (unknown total) progress.
7685///
7686/// # Content Categories
7687///
7688/// - Flow Content
7689/// - Phrasing Content
7690/// - Palpable Content
7691///
7692/// # Permitted Content Model
7693///
7694/// - Phrasing content (fallback for browsers without progress support, but no `<progress>` descendants)
7695///
7696/// # Common Use Cases
7697///
7698/// - File upload progress indicators
7699/// - Download progress displays
7700/// - Form completion tracking
7701/// - Multi-step process progress
7702/// - Loading indicators with known duration
7703///
7704/// # Key Attributes
7705///
7706/// - `value`: Current progress value
7707/// - `max`: Maximum value (total amount of work, default: 1.0)
7708///
7709/// # Example
7710///
7711/// ```html
7712/// <!-- Basic progress bar -->
7713/// <label for="file-progress">Uploading file:</label>
7714/// <progress id="file-progress" value="70" max="100">70%</progress>
7715///
7716/// <!-- Progress with percentage label -->
7717/// <p>
7718///   Installation progress:
7719///   <progress value="0.6" max="1.0">60%</progress>
7720///   60%
7721/// </p>
7722///
7723/// <!-- Indeterminate progress (no value attribute) -->
7724/// <p>
7725///   Loading...
7726///   <progress max="100">Loading...</progress>
7727/// </p>
7728///
7729/// <!-- Progress updated via JavaScript -->
7730/// <progress id="dynamic-progress" value="0" max="100"></progress>
7731/// <script>
7732///   let progress = 0;
7733///   setInterval(() => {
7734///     progress = Math.min(progress + 10, 100);
7735///     document.getElementById('dynamic-progress').value = progress;
7736///   }, 500);
7737/// </script>
7738///
7739/// <!-- Download progress -->
7740/// <p>
7741///   Downloading: <span id="filename">document.pdf</span>
7742///   <progress id="download" value="2.5" max="10">2.5 MB of 10 MB</progress>
7743///   <span id="progress-text">2.5 MB of 10 MB</span>
7744/// </p>
7745///
7746/// <!-- Form completion indicator -->
7747/// <form>
7748///   <p>Form completion: <progress value="3" max="5">Step 3 of 5</progress></p>
7749///   <!-- Form fields here -->
7750/// </form>
7751///
7752/// <!-- Styled progress bar -->
7753/// <progress value="75" max="100" style="width: 300px; height: 30px;">
7754///   75% complete
7755/// </progress>
7756/// ```
7757///
7758/// # Accessibility
7759///
7760/// - Provide text content as fallback for older browsers
7761/// - Use `aria-label` or nearby text to describe what's progressing
7762/// - Update `aria-valuenow`, `aria-valuemin`, `aria-valuemax` for complex cases
7763/// - Announce progress updates to screen readers with aria-live regions
7764/// - Ensure progress bar has sufficient color contrast
7765///
7766/// # WHATWG Specification
7767///
7768/// - [4.10.13 The progress element](https://html.spec.whatwg.org/multipage/form-elements.html#the-progress-element)
7769pub struct Progress;
7770impl HtmlElement for Progress {
7771    const TAG: &'static str = "progress";
7772}
7773impl FlowContent for Progress {}
7774impl PhrasingContent for Progress {}
7775impl PalpableContent for Progress {}
7776
7777/// The `<meter>` element - represents a scalar measurement within a known range.
7778///
7779/// # Purpose
7780///
7781/// The `<meter>` element represents a scalar measurement within a known range, or a fractional
7782/// value. Used for displaying measurements like disk usage, voting results, relevance scores,
7783/// or any gauge-style indicator. Unlike `<progress>`, which shows task completion, `<meter>`
7784/// shows a measurement on a scale.
7785///
7786/// # Content Categories
7787///
7788/// - Flow Content
7789/// - Phrasing Content
7790/// - Palpable Content
7791///
7792/// # Permitted Content Model
7793///
7794/// - Phrasing content (fallback for browsers without meter support, but no `<meter>` descendants)
7795///
7796/// # Common Use Cases
7797///
7798/// - Disk space usage indicators
7799/// - Battery level displays
7800/// - Rating or scoring displays
7801/// - Temperature or volume gauges
7802/// - Relevance or match percentages
7803///
7804/// # Key Attributes
7805///
7806/// - `value`: Current value (required)
7807/// - `min`: Lower bound of range (default: 0)
7808/// - `max`: Upper bound of range (default: 1)
7809/// - `low`: Upper bound of "low" range
7810/// - `high`: Lower bound of "high" range
7811/// - `optimum`: Optimal value in the range
7812///
7813/// # Example
7814///
7815/// ```html
7816/// <!-- Basic meter -->
7817/// <label for="disk-usage">Disk usage:</label>
7818/// <meter id="disk-usage" value="0.6">60%</meter>
7819///
7820/// <!-- Meter with full range specification -->
7821/// <label for="battery">Battery level:</label>
7822/// <meter id="battery"
7823///        min="0" max="100"
7824///        low="20" high="80"
7825///        optimum="100"
7826///        value="65">65%</meter>
7827///
7828/// <!-- High value is bad (e.g., CPU usage) -->
7829/// <label for="cpu">CPU usage:</label>
7830/// <meter id="cpu"
7831///        min="0" max="100"
7832///        low="25" high="75"
7833///        optimum="0"
7834///        value="85">85%</meter>
7835///
7836/// <!-- Low value is bad (e.g., fuel) -->
7837/// <label for="fuel">Fuel level:</label>
7838/// <meter id="fuel"
7839///        min="0" max="100"
7840///        low="20" high="80"
7841///        optimum="100"
7842///        value="15">15%</meter>
7843///
7844/// <!-- Rating display -->
7845/// <p>
7846///   Rating:
7847///   <meter min="0" max="5" value="4.2">4.2 out of 5</meter>
7848///   4.2 out of 5 stars
7849/// </p>
7850///
7851/// <!-- Storage usage -->
7852/// <p>
7853///   Storage used:
7854///   <meter min="0" max="1000" low="700" high="900" value="852">
7855///     852 GB of 1000 GB
7856///   </meter>
7857///   852 GB / 1 TB
7858/// </p>
7859///
7860/// <!-- Temperature gauge -->
7861/// <label for="temp">Room temperature:</label>
7862/// <meter id="temp"
7863///        min="0" max="50"
7864///        low="18" high="28"
7865///        optimum="22"
7866///        value="25">25°C</meter>
7867/// ```
7868///
7869/// # Accessibility
7870///
7871/// - Provide text content as fallback
7872/// - Use labels to describe what's being measured
7873/// - Ensure color isn't the only indicator of status
7874/// - Browser typically colors the meter based on value ranges
7875/// - Screen readers announce the value and context
7876///
7877/// # WHATWG Specification
7878///
7879/// - [4.10.14 The meter element](https://html.spec.whatwg.org/multipage/form-elements.html#the-meter-element)
7880pub struct Meter;
7881impl HtmlElement for Meter {
7882    const TAG: &'static str = "meter";
7883}
7884impl FlowContent for Meter {}
7885impl PhrasingContent for Meter {}
7886impl PalpableContent for Meter {}
7887
7888/// The `<fieldset>` element - groups related form controls and labels.
7889///
7890/// # Purpose
7891///
7892/// The `<fieldset>` element groups related form controls and labels within a form. Provides
7893/// semantic grouping and visual separation of form sections. Can be disabled as a group,
7894/// affecting all contained controls. Typically rendered with a border around the grouped
7895/// elements.
7896///
7897/// # Content Categories
7898///
7899/// - Flow Content
7900/// - Palpable Content
7901///
7902/// # Permitted Content Model
7903///
7904/// - Optionally a `<legend>` element (must be first child)
7905/// - Followed by flow content
7906///
7907/// # Common Use Cases
7908///
7909/// - Grouping personal information fields
7910/// - Grouping address fields
7911/// - Grouping related checkboxes or radio buttons
7912/// - Creating form sections with logical divisions
7913/// - Disabling multiple controls at once
7914///
7915/// # Key Attributes
7916///
7917/// - `disabled`: Disables all form controls within the fieldset
7918/// - `form`: Associates with a form by ID
7919/// - `name`: Name for the fieldset (for scripting purposes)
7920///
7921/// # Example
7922///
7923/// ```html
7924/// <!-- Basic fieldset with legend -->
7925/// <fieldset>
7926///   <legend>Personal Information</legend>
7927///   <label for="fname">First name:</label>
7928///   <input type="text" id="fname" name="fname">
7929///   
7930///   <label for="lname">Last name:</label>
7931///   <input type="text" id="lname" name="lname">
7932/// </fieldset>
7933///
7934/// <!-- Radio button group -->
7935/// <fieldset>
7936///   <legend>Choose your preferred contact method:</legend>
7937///   <input type="radio" id="email" name="contact" value="email">
7938///   <label for="email">Email</label>
7939///   
7940///   <input type="radio" id="phone" name="contact" value="phone">
7941///   <label for="phone">Phone</label>
7942///   
7943///   <input type="radio" id="mail" name="contact" value="mail">
7944///   <label for="mail">Mail</label>
7945/// </fieldset>
7946///
7947/// <!-- Address fieldset -->
7948/// <fieldset>
7949///   <legend>Billing Address</legend>
7950///   <label for="street">Street:</label>
7951///   <input type="text" id="street" name="street">
7952///   
7953///   <label for="city">City:</label>
7954///   <input type="text" id="city" name="city">
7955///   
7956///   <label for="zip">ZIP Code:</label>
7957///   <input type="text" id="zip" name="zip">
7958/// </fieldset>
7959///
7960/// <!-- Disabled fieldset -->
7961/// <fieldset disabled>
7962///   <legend>Advanced Settings (Coming Soon)</legend>
7963///   <label for="option1">Option 1:</label>
7964///   <input type="checkbox" id="option1" name="option1">
7965///   
7966///   <label for="option2">Option 2:</label>
7967///   <input type="checkbox" id="option2" name="option2">
7968/// </fieldset>
7969///
7970/// <!-- Nested fieldsets -->
7971/// <form>
7972///   <fieldset>
7973///     <legend>Account Information</legend>
7974///     
7975///     <fieldset>
7976///       <legend>Login Credentials</legend>
7977///       <label for="user">Username:</label>
7978///       <input type="text" id="user" name="username">
7979///       
7980///       <label for="pass">Password:</label>
7981///       <input type="password" id="pass" name="password">
7982///     </fieldset>
7983///     
7984///     <fieldset>
7985///       <legend>Contact Details</legend>
7986///       <label for="email">Email:</label>
7987///       <input type="email" id="email" name="email">
7988///     </fieldset>
7989///   </fieldset>
7990/// </form>
7991/// ```
7992///
7993/// # Accessibility
7994///
7995/// - Use `<legend>` to provide a clear group label
7996/// - Legends are announced by screen readers when entering the fieldset
7997/// - Helps users understand form structure and relationships
7998/// - Disabled fieldsets clearly indicate unavailable sections
7999/// - Ensure legends are concise and descriptive
8000///
8001/// # WHATWG Specification
8002///
8003/// - [4.10.15 The fieldset element](https://html.spec.whatwg.org/multipage/form-elements.html#the-fieldset-element)
8004pub struct Fieldset;
8005impl HtmlElement for Fieldset {
8006    const TAG: &'static str = "fieldset";
8007}
8008impl FlowContent for Fieldset {}
8009impl PalpableContent for Fieldset {}
8010
8011/// The `<legend>` element - represents a caption for a `<fieldset>`.
8012///
8013/// # Purpose
8014///
8015/// The `<legend>` element provides a caption or title for its parent `<fieldset>` element.
8016/// It describes the group of form controls contained within the fieldset. Must be the first
8017/// child of the fieldset if present. Typically displayed as a title positioned on the border
8018/// of the fieldset.
8019///
8020/// # Content Categories
8021///
8022/// - None (only valid as first child of `<fieldset>`)
8023///
8024/// # Permitted Content Model
8025///
8026/// - Phrasing content
8027/// - Optionally intermixed with heading content
8028///
8029/// # Common Use Cases
8030///
8031/// - Labeling form sections
8032/// - Describing groups of radio buttons or checkboxes
8033/// - Titling address or contact information groups
8034/// - Naming configuration sections
8035/// - Providing context for related form fields
8036///
8037/// # Key Attributes
8038///
8039/// - Global attributes only
8040///
8041/// # Example
8042///
8043/// ```html
8044/// <!-- Basic legend -->
8045/// <fieldset>
8046///   <legend>Personal Details</legend>
8047///   <label for="name">Name:</label>
8048///   <input type="text" id="name" name="name">
8049/// </fieldset>
8050///
8051/// <!-- Legend for radio button group -->
8052/// <fieldset>
8053///   <legend>Select your subscription plan:</legend>
8054///   <input type="radio" id="basic" name="plan" value="basic">
8055///   <label for="basic">Basic - $9.99/mo</label>
8056///   
8057///   <input type="radio" id="premium" name="plan" value="premium">
8058///   <label for="premium">Premium - $19.99/mo</label>
8059/// </fieldset>
8060///
8061/// <!-- Legend with emphasis -->
8062/// <fieldset>
8063///   <legend><strong>Required Information</strong></legend>
8064///   <label for="email">Email:</label>
8065///   <input type="email" id="email" name="email" required>
8066/// </fieldset>
8067///
8068/// <!-- Legend with additional context -->
8069/// <fieldset>
8070///   <legend>
8071///     Shipping Address
8072///     <small>(where should we deliver your order?)</small>
8073///   </legend>
8074///   <label for="address">Address:</label>
8075///   <input type="text" id="address" name="address">
8076/// </fieldset>
8077///
8078/// <!-- Legend for checkbox group -->
8079/// <fieldset>
8080///   <legend>Select your interests:</legend>
8081///   <input type="checkbox" id="sports" name="interests" value="sports">
8082///   <label for="sports">Sports</label>
8083///   
8084///   <input type="checkbox" id="music" name="interests" value="music">
8085///   <label for="music">Music</label>
8086///   
8087///   <input type="checkbox" id="reading" name="interests" value="reading">
8088///   <label for="reading">Reading</label>
8089/// </fieldset>
8090///
8091/// <!-- Legend for payment information -->
8092/// <fieldset>
8093///   <legend>Payment Information</legend>
8094///   <label for="card">Card Number:</label>
8095///   <input type="text" id="card" name="card-number">
8096///   
8097///   <label for="expiry">Expiry Date:</label>
8098///   <input type="text" id="expiry" name="expiry">
8099/// </fieldset>
8100/// ```
8101///
8102/// # Accessibility
8103///
8104/// - Legends are announced by screen readers when users enter the fieldset
8105/// - Provides important context for form field groups
8106/// - Keep legend text concise and descriptive
8107/// - Use heading elements within legend sparingly
8108/// - Helps users understand the purpose of grouped fields
8109///
8110/// # WHATWG Specification
8111///
8112/// - [4.10.16 The legend element](https://html.spec.whatwg.org/multipage/form-elements.html#the-legend-element)
8113pub struct Legend;
8114impl HtmlElement for Legend {
8115    const TAG: &'static str = "legend";
8116}
8117
8118// =============================================================================
8119// Interactive Elements
8120// =============================================================================
8121
8122/// The `<details>` element - represents a disclosure widget from which the user can obtain additional information.
8123///
8124/// # Purpose
8125///
8126/// The `<details>` element creates a disclosure widget that users can open and close to
8127/// reveal or hide additional content. Provides built-in interactive functionality without
8128/// JavaScript. The first child should be a `<summary>` element that serves as the toggle label.
8129///
8130/// # Content Categories
8131///
8132/// - Flow Content
8133/// - Interactive Content
8134/// - Palpable Content
8135///
8136/// # Permitted Content Model
8137///
8138/// - One `<summary>` element (as first child)
8139/// - Followed by flow content
8140///
8141/// # Common Use Cases
8142///
8143/// - FAQ (Frequently Asked Questions) sections
8144/// - Accordion-style content
8145/// - Progressive disclosure of information
8146/// - Collapsible content sections
8147/// - Show/hide additional details
8148///
8149/// # Key Attributes
8150///
8151/// - `open`: Makes the details visible by default
8152///
8153/// # Example
8154///
8155/// ```html
8156/// <!-- Basic details element -->
8157/// <details>
8158///   <summary>Click to expand</summary>
8159///   <p>This is the hidden content that appears when you click the summary.</p>
8160/// </details>
8161///
8162/// <!-- FAQ item -->
8163/// <details>
8164///   <summary>What is HTML?</summary>
8165///   <p>HTML (HyperText Markup Language) is the standard markup language for creating web pages.</p>
8166/// </details>
8167///
8168/// <!-- Details open by default -->
8169/// <details open>
8170///   <summary>Important Information</summary>
8171///   <p>This section is expanded by default because of the 'open' attribute.</p>
8172/// </details>
8173///
8174/// <!-- Multiple details forming an accordion -->
8175/// <details>
8176///   <summary>Section 1: Introduction</summary>
8177///   <p>This is the introduction section with detailed information.</p>
8178/// </details>
8179/// <details>
8180///   <summary>Section 2: Features</summary>
8181///   <ul>
8182///     <li>Feature A</li>
8183///     <li>Feature B</li>
8184///     <li>Feature C</li>
8185///   </ul>
8186/// </details>
8187/// <details>
8188///   <summary>Section 3: Conclusion</summary>
8189///   <p>Final thoughts and summary.</p>
8190/// </details>
8191///
8192/// <!-- Details with rich content -->
8193/// <details>
8194///   <summary>View shipping options</summary>
8195///   <table>
8196///     <thead>
8197///       <tr>
8198///         <th>Method</th>
8199///         <th>Time</th>
8200///         <th>Cost</th>
8201///       </tr>
8202///     </thead>
8203///     <tbody>
8204///       <tr>
8205///         <td>Standard</td>
8206///         <td>5-7 days</td>
8207///         <td>$5.99</td>
8208///       </tr>
8209///       <tr>
8210///         <td>Express</td>
8211///         <td>2-3 days</td>
8212///         <td>$12.99</td>
8213///       </tr>
8214///     </tbody>
8215///   </table>
8216/// </details>
8217///
8218/// <!-- Nested details -->
8219/// <details>
8220///   <summary>Chapter 1</summary>
8221///   <p>Chapter introduction...</p>
8222///   <details>
8223///     <summary>Section 1.1</summary>
8224///     <p>Detailed content for section 1.1</p>
8225///   </details>
8226///   <details>
8227///     <summary>Section 1.2</summary>
8228///     <p>Detailed content for section 1.2</p>
8229///   </details>
8230/// </details>
8231/// ```
8232///
8233/// # Accessibility
8234///
8235/// - Keyboard accessible by default (Space/Enter to toggle)
8236/// - Screen readers announce the collapsed/expanded state
8237/// - Use descriptive summary text
8238/// - Ensure content within is properly structured
8239/// - Consider adding visual indicators for state
8240/// - Works without JavaScript
8241///
8242/// # WHATWG Specification
8243///
8244/// - [4.11.1 The details element](https://html.spec.whatwg.org/multipage/interactive-elements.html#the-details-element)
8245pub struct Details;
8246impl HtmlElement for Details {
8247    const TAG: &'static str = "details";
8248}
8249impl FlowContent for Details {}
8250impl InteractiveContent for Details {}
8251impl PalpableContent for Details {}
8252
8253/// The `<summary>` element - represents a summary, caption, or legend for a `<details>` element.
8254///
8255/// # Purpose
8256///
8257/// The `<summary>` element provides a visible heading or label for its parent `<details>`
8258/// element. Users click the summary to toggle the visibility of the details content. Acts
8259/// as the disclosure button/trigger. If omitted, browser provides a default label like
8260/// "Details".
8261///
8262/// # Content Categories
8263///
8264/// - None (only valid as first child of `<details>`)
8265///
8266/// # Permitted Content Model
8267///
8268/// - Phrasing content
8269/// - Optionally intermixed with heading content
8270///
8271/// # Common Use Cases
8272///
8273/// - FAQ question labels
8274/// - Accordion section titles
8275/// - Toggle button labels
8276/// - Expandable content headings
8277/// - Show/hide trigger text
8278///
8279/// # Key Attributes
8280///
8281/// - Global attributes only
8282///
8283/// # Example
8284///
8285/// ```html
8286/// <!-- Simple summary -->
8287/// <details>
8288///   <summary>Click to reveal answer</summary>
8289///   <p>This is the answer to the question.</p>
8290/// </details>
8291///
8292/// <!-- Summary with icon/emoji -->
8293/// <details>
8294///   <summary>📋 View Details</summary>
8295///   <p>Additional information here.</p>
8296/// </details>
8297///
8298/// <!-- Summary with styled text -->
8299/// <details>
8300///   <summary><strong>Important Notice</strong></summary>
8301///   <p>Please read this important information carefully.</p>
8302/// </details>
8303///
8304/// <!-- Summary for FAQ -->
8305/// <details>
8306///   <summary>How do I reset my password?</summary>
8307///   <ol>
8308///     <li>Click on "Forgot Password"</li>
8309///     <li>Enter your email address</li>
8310///     <li>Check your email for reset link</li>
8311///   </ol>
8312/// </details>
8313///
8314/// <!-- Summary with heading -->
8315/// <details>
8316///   <summary><h3>Chapter 1: Introduction</h3></summary>
8317///   <p>Chapter content goes here...</p>
8318/// </details>
8319///
8320/// <!-- Summary with additional context -->
8321/// <details>
8322///   <summary>
8323///     Product Specifications
8324///     <small>(click to expand)</small>
8325///   </summary>
8326///   <ul>
8327///     <li>Weight: 2.5 kg</li>
8328///     <li>Dimensions: 30cm x 20cm x 10cm</li>
8329///     <li>Material: Aluminum</li>
8330///   </ul>
8331/// </details>
8332///
8333/// <!-- Summary with custom styling -->
8334/// <details>
8335///   <summary style="cursor: pointer; color: #0066cc;">
8336///     ► Show More Information
8337///   </summary>
8338///   <p>Hidden content revealed on click.</p>
8339/// </details>
8340/// ```
8341///
8342/// # Accessibility
8343///
8344/// - Acts as a button control, automatically keyboard accessible
8345/// - Screen readers announce it as a button with expanded/collapsed state
8346/// - Use descriptive text that clearly indicates what will be revealed
8347/// - Ensure summary is meaningful when read alone
8348/// - Avoid generic text like "Click here" or "More"
8349/// - Browser typically adds a disclosure triangle/arrow indicator
8350///
8351/// # WHATWG Specification
8352///
8353/// - [4.11.2 The summary element](https://html.spec.whatwg.org/multipage/interactive-elements.html#the-summary-element)
8354pub struct Summary;
8355impl HtmlElement for Summary {
8356    const TAG: &'static str = "summary";
8357}
8358
8359/// The `<dialog>` element - represents a dialog box or other interactive component.
8360///
8361/// # Purpose
8362///
8363/// The `<dialog>` element represents a dialog box, modal, or subwindow that overlays the
8364/// main content. Can be shown modally (blocking interaction with the rest of the page) or
8365/// non-modally. Provides built-in functionality for overlays, keyboard management (ESC to
8366/// close), and focus trapping without requiring JavaScript libraries.
8367///
8368/// # Content Categories
8369///
8370/// - Flow Content
8371///
8372/// # Permitted Content Model
8373///
8374/// - Flow content
8375///
8376/// # Common Use Cases
8377///
8378/// - Modal confirmation dialogs
8379/// - Alert and notification popups
8380/// - Login and signup forms
8381/// - Settings and preferences panels
8382/// - Image lightboxes and galleries
8383///
8384/// # Key Attributes
8385///
8386/// - `open`: Makes the dialog visible (use JavaScript's `show()` or `showModal()` methods instead)
8387///
8388/// # Example
8389///
8390/// ```html
8391/// <!-- Basic dialog -->
8392/// <dialog id="myDialog">
8393///   <h2>Dialog Title</h2>
8394///   <p>This is a dialog box.</p>
8395///   <button onclick="this.closest('dialog').close()">Close</button>
8396/// </dialog>
8397/// <button onclick="document.getElementById('myDialog').showModal()">Open Dialog</button>
8398///
8399/// <!-- Confirmation dialog -->
8400/// <dialog id="confirmDialog">
8401///   <form method="dialog">
8402///     <h2>Confirm Action</h2>
8403///     <p>Are you sure you want to proceed?</p>
8404///     <button value="cancel">Cancel</button>
8405///     <button value="confirm">Confirm</button>
8406///   </form>
8407/// </dialog>
8408///
8409/// <!-- Login dialog -->
8410/// <dialog id="loginDialog">
8411///   <h2>Log In</h2>
8412///   <form method="dialog">
8413///     <label for="username">Username:</label>
8414///     <input type="text" id="username" name="username" required>
8415///     
8416///     <label for="password">Password:</label>
8417///     <input type="password" id="password" name="password" required>
8418///     
8419///     <button type="submit">Log In</button>
8420///     <button type="button" onclick="this.closest('dialog').close()">Cancel</button>
8421///   </form>
8422/// </dialog>
8423///
8424/// <!-- Dialog with backdrop -->
8425/// <dialog id="modalDialog">
8426///   <h2>Modal Dialog</h2>
8427///   <p>This dialog blocks interaction with the rest of the page.</p>
8428///   <button onclick="document.getElementById('modalDialog').close()">Close</button>
8429/// </dialog>
8430/// <button onclick="document.getElementById('modalDialog').showModal()">Show Modal</button>
8431///
8432/// <!-- Alert dialog -->
8433/// <dialog id="alertDialog">
8434///   <div role="alert">
8435///     <h2>Warning!</h2>
8436///     <p>This action cannot be undone.</p>
8437///     <button onclick="this.closest('dialog').close()">OK</button>
8438///   </div>
8439/// </dialog>
8440///
8441/// <!-- Non-modal dialog -->
8442/// <dialog id="nonModalDialog">
8443///   <h2>Non-Modal Dialog</h2>
8444///   <p>You can still interact with the page behind this dialog.</p>
8445///   <button onclick="this.closest('dialog').close()">Close</button>
8446/// </dialog>
8447/// <button onclick="document.getElementById('nonModalDialog').show()">Show Non-Modal</button>
8448///
8449/// <!-- Dialog with return value -->
8450/// <dialog id="colorDialog">
8451///   <form method="dialog">
8452///     <h2>Choose a color</h2>
8453///     <button value="red">Red</button>
8454///     <button value="blue">Blue</button>
8455///     <button value="green">Green</button>
8456///   </form>
8457/// </dialog>
8458/// <script>
8459///   const dialog = document.getElementById('colorDialog');
8460///   dialog.addEventListener('close', () => {
8461///     console.log('Selected color:', dialog.returnValue);
8462///   });
8463/// </script>
8464/// ```
8465///
8466/// # Accessibility
8467///
8468/// - Focus is automatically moved to the dialog when opened with `showModal()`
8469/// - ESC key closes modal dialogs by default
8470/// - Backdrop click behavior can be customized
8471/// - Use appropriate ARIA roles (role="dialog" or role="alertdialog")
8472/// - Provide clear close mechanisms
8473/// - Ensure focus returns to triggering element on close
8474/// - Use `aria-labelledby` or `aria-label` to identify the dialog
8475/// - Trap focus within modal dialogs
8476///
8477/// # WHATWG Specification
8478///
8479/// - [4.11.3 The dialog element](https://html.spec.whatwg.org/multipage/interactive-elements.html#the-dialog-element)
8480pub struct Dialog;
8481impl HtmlElement for Dialog {
8482    const TAG: &'static str = "dialog";
8483}
8484impl FlowContent for Dialog {}
8485
8486// =============================================================================
8487// Web Components
8488// =============================================================================
8489
8490// Note: Custom elements are handled separately
8491
8492// =============================================================================
8493// Deprecated/Obsolete Elements (included for completeness)
8494// =============================================================================
8495
8496/// The `<del>` element - deleted text.
8497pub struct Del;
8498impl HtmlElement for Del {
8499    const TAG: &'static str = "del";
8500}
8501impl FlowContent for Del {}
8502impl PhrasingContent for Del {}
8503
8504/// The `<ins>` element - inserted text.
8505pub struct Ins;
8506impl HtmlElement for Ins {
8507    const TAG: &'static str = "ins";
8508}
8509impl FlowContent for Ins {}
8510impl PhrasingContent for Ins {}
8511
8512// =============================================================================
8513// Content Model Implementations
8514// https://html.spec.whatwg.org/multipage/dom.html#content-models
8515// =============================================================================
8516
8517// -----------------------------------------------------------------------------
8518// Text can be contained by phrasing content elements
8519// -----------------------------------------------------------------------------
8520
8521impl CanContain<Text> for Span {}
8522impl CanContain<Text> for A {}
8523impl CanContain<Text> for Em {}
8524impl CanContain<Text> for Strong {}
8525impl CanContain<Text> for Small {}
8526impl CanContain<Text> for S {}
8527impl CanContain<Text> for Cite {}
8528impl CanContain<Text> for Q {}
8529impl CanContain<Text> for Dfn {}
8530impl CanContain<Text> for Abbr {}
8531impl CanContain<Text> for Code {}
8532impl CanContain<Text> for Var {}
8533impl CanContain<Text> for Samp {}
8534impl CanContain<Text> for Kbd {}
8535impl CanContain<Text> for Sub {}
8536impl CanContain<Text> for Sup {}
8537impl CanContain<Text> for I {}
8538impl CanContain<Text> for B {}
8539impl CanContain<Text> for U {}
8540impl CanContain<Text> for Mark {}
8541impl CanContain<Text> for Bdi {}
8542impl CanContain<Text> for Bdo {}
8543impl CanContain<Text> for Data {}
8544impl CanContain<Text> for Time {}
8545
8546// Text in block-level elements
8547impl CanContain<Text> for P {}
8548impl CanContain<Text> for H1 {}
8549impl CanContain<Text> for H2 {}
8550impl CanContain<Text> for H3 {}
8551impl CanContain<Text> for H4 {}
8552impl CanContain<Text> for H5 {}
8553impl CanContain<Text> for H6 {}
8554impl CanContain<Text> for Pre {}
8555impl CanContain<Text> for Blockquote {}
8556impl CanContain<Text> for Li {}
8557impl CanContain<Text> for Dt {}
8558impl CanContain<Text> for Dd {}
8559impl CanContain<Text> for Figcaption {}
8560impl CanContain<Text> for Div {}
8561impl CanContain<Text> for Td {}
8562impl CanContain<Text> for Th {}
8563impl CanContain<Text> for Caption {}
8564impl CanContain<Text> for Label {}
8565impl CanContain<Text> for Legend {}
8566impl CanContain<Text> for Summary {}
8567impl CanContain<Text> for Title {}
8568impl CanContain<Text> for Option_ {}
8569impl CanContain<Text> for Textarea {}
8570impl CanContain<Text> for Button {}
8571impl CanContain<Text> for Script {}
8572impl CanContain<Text> for Style {}
8573
8574// -----------------------------------------------------------------------------
8575// Document structure
8576// https://html.spec.whatwg.org/multipage/semantics.html
8577// -----------------------------------------------------------------------------
8578
8579impl CanContain<Head> for Html {}
8580impl CanContain<Body> for Html {}
8581
8582impl CanContain<Title> for Head {}
8583impl CanContain<Base> for Head {}
8584impl CanContain<Link> for Head {}
8585impl CanContain<Meta> for Head {}
8586impl CanContain<Style> for Head {}
8587impl CanContain<Script> for Head {}
8588impl CanContain<Noscript> for Head {}
8589impl CanContain<Template> for Head {}
8590
8591// -----------------------------------------------------------------------------
8592// Flow content containers (can contain any flow content)
8593// -----------------------------------------------------------------------------
8594
8595// Body can contain flow content
8596impl<T: FlowContent> CanContain<T> for Body {}
8597
8598// Div can contain flow content
8599impl<T: FlowContent> CanContain<T> for Div {}
8600
8601// Article can contain flow content
8602impl<T: FlowContent> CanContain<T> for Article {}
8603
8604// Section can contain flow content
8605impl<T: FlowContent> CanContain<T> for Section {}
8606
8607// Nav can contain flow content
8608impl<T: FlowContent> CanContain<T> for Nav {}
8609
8610// Aside can contain flow content
8611impl<T: FlowContent> CanContain<T> for Aside {}
8612
8613// Header can contain flow content
8614impl<T: FlowContent> CanContain<T> for Header {}
8615
8616// Footer can contain flow content
8617impl<T: FlowContent> CanContain<T> for Footer {}
8618
8619// Main can contain flow content
8620impl<T: FlowContent> CanContain<T> for Main {}
8621
8622// Address can contain flow content
8623impl<T: FlowContent> CanContain<T> for Address {}
8624
8625// Blockquote can contain flow content
8626impl<T: FlowContent> CanContain<T> for Blockquote {}
8627
8628// Figure can contain flow content
8629impl<T: FlowContent> CanContain<T> for Figure {}
8630
8631// Figcaption can contain flow content
8632impl<T: FlowContent> CanContain<T> for Figcaption {}
8633
8634// Details can contain flow content
8635impl<T: FlowContent> CanContain<T> for Details {}
8636impl CanContain<Summary> for Details {}
8637
8638// Dialog can contain flow content
8639impl<T: FlowContent> CanContain<T> for Dialog {}
8640
8641// Search can contain flow content
8642impl<T: FlowContent> CanContain<T> for Search {}
8643
8644// Form can contain flow content
8645impl<T: FlowContent> CanContain<T> for Form {}
8646
8647// Fieldset can contain flow content
8648impl<T: FlowContent> CanContain<T> for Fieldset {}
8649impl CanContain<Legend> for Fieldset {}
8650
8651// -----------------------------------------------------------------------------
8652// Phrasing content containers (can only contain phrasing content)
8653// https://html.spec.whatwg.org/multipage/dom.html#phrasing-content
8654// -----------------------------------------------------------------------------
8655
8656// P can only contain phrasing content
8657impl<T: PhrasingContent> CanContain<T> for P {}
8658
8659// Headings can only contain phrasing content
8660impl<T: PhrasingContent> CanContain<T> for H1 {}
8661impl<T: PhrasingContent> CanContain<T> for H2 {}
8662impl<T: PhrasingContent> CanContain<T> for H3 {}
8663impl<T: PhrasingContent> CanContain<T> for H4 {}
8664impl<T: PhrasingContent> CanContain<T> for H5 {}
8665impl<T: PhrasingContent> CanContain<T> for H6 {}
8666
8667// Pre can contain phrasing content
8668impl<T: PhrasingContent> CanContain<T> for Pre {}
8669
8670// Span can contain phrasing content
8671impl<T: PhrasingContent> CanContain<T> for Span {}
8672
8673// A can contain phrasing content (transparent, but simplified here)
8674impl<T: PhrasingContent> CanContain<T> for A {}
8675
8676// Em, Strong, etc. can contain phrasing content
8677impl<T: PhrasingContent> CanContain<T> for Em {}
8678impl<T: PhrasingContent> CanContain<T> for Strong {}
8679impl<T: PhrasingContent> CanContain<T> for Small {}
8680impl<T: PhrasingContent> CanContain<T> for S {}
8681impl<T: PhrasingContent> CanContain<T> for Cite {}
8682impl<T: PhrasingContent> CanContain<T> for Q {}
8683impl<T: PhrasingContent> CanContain<T> for Dfn {}
8684impl<T: PhrasingContent> CanContain<T> for Abbr {}
8685impl<T: PhrasingContent> CanContain<T> for Code {}
8686impl<T: PhrasingContent> CanContain<T> for Var {}
8687impl<T: PhrasingContent> CanContain<T> for Samp {}
8688impl<T: PhrasingContent> CanContain<T> for Kbd {}
8689impl<T: PhrasingContent> CanContain<T> for Sub {}
8690impl<T: PhrasingContent> CanContain<T> for Sup {}
8691impl<T: PhrasingContent> CanContain<T> for I {}
8692impl<T: PhrasingContent> CanContain<T> for B {}
8693impl<T: PhrasingContent> CanContain<T> for U {}
8694impl<T: PhrasingContent> CanContain<T> for Mark {}
8695impl<T: PhrasingContent> CanContain<T> for Bdi {}
8696impl<T: PhrasingContent> CanContain<T> for Bdo {}
8697impl<T: PhrasingContent> CanContain<T> for Data {}
8698impl<T: PhrasingContent> CanContain<T> for Time {}
8699impl<T: PhrasingContent> CanContain<T> for Del {}
8700impl<T: PhrasingContent> CanContain<T> for Ins {}
8701
8702// Ruby annotation
8703impl<T: PhrasingContent> CanContain<T> for Ruby {}
8704impl CanContain<Rt> for Ruby {}
8705impl CanContain<Rp> for Ruby {}
8706
8707// Label can contain phrasing content
8708impl<T: PhrasingContent> CanContain<T> for Label {}
8709
8710// Output can contain phrasing content
8711impl<T: PhrasingContent> CanContain<T> for Output {}
8712
8713// Legend can contain phrasing content
8714impl<T: PhrasingContent> CanContain<T> for Legend {}
8715
8716// Summary can contain phrasing content
8717impl<T: PhrasingContent> CanContain<T> for Summary {}
8718
8719// Button can contain phrasing content
8720impl<T: PhrasingContent> CanContain<T> for Button {}
8721
8722// Progress and Meter can contain phrasing content
8723impl<T: PhrasingContent> CanContain<T> for Progress {}
8724impl<T: PhrasingContent> CanContain<T> for Meter {}
8725
8726// -----------------------------------------------------------------------------
8727// List content models
8728// https://html.spec.whatwg.org/multipage/grouping-content.html
8729// -----------------------------------------------------------------------------
8730
8731// Ul can only contain Li (and script-supporting elements)
8732impl CanContain<Li> for Ul {}
8733impl CanContain<Script> for Ul {}
8734impl CanContain<Template> for Ul {}
8735
8736// Ol can only contain Li (and script-supporting elements)
8737impl CanContain<Li> for Ol {}
8738impl CanContain<Script> for Ol {}
8739impl CanContain<Template> for Ol {}
8740
8741// Menu can only contain Li (and script-supporting elements)
8742impl CanContain<Li> for Menu {}
8743impl CanContain<Script> for Menu {}
8744impl CanContain<Template> for Menu {}
8745
8746// Li can contain flow content
8747impl<T: FlowContent> CanContain<T> for Li {}
8748
8749// Dl can contain Dt, Dd, and div (for grouping)
8750impl CanContain<Dt> for Dl {}
8751impl CanContain<Dd> for Dl {}
8752impl CanContain<Div> for Dl {}
8753impl CanContain<Script> for Dl {}
8754impl CanContain<Template> for Dl {}
8755
8756// Dt can contain flow content (but no header, footer, sectioning, heading)
8757impl<T: PhrasingContent> CanContain<T> for Dt {}
8758
8759// Dd can contain flow content
8760impl<T: FlowContent> CanContain<T> for Dd {}
8761
8762// -----------------------------------------------------------------------------
8763// Table content model
8764// https://html.spec.whatwg.org/multipage/tables.html
8765// -----------------------------------------------------------------------------
8766
8767// Table can contain caption, colgroup, thead, tbody, tfoot, tr
8768impl CanContain<Caption> for Table {}
8769impl CanContain<Colgroup> for Table {}
8770impl CanContain<Thead> for Table {}
8771impl CanContain<Tbody> for Table {}
8772impl CanContain<Tfoot> for Table {}
8773impl CanContain<Tr> for Table {}
8774impl CanContain<Script> for Table {}
8775impl CanContain<Template> for Table {}
8776
8777// Caption can contain flow content (but no tables)
8778impl<T: FlowContent> CanContain<T> for Caption {}
8779
8780// Colgroup can contain Col and Template
8781impl CanContain<Col> for Colgroup {}
8782impl CanContain<Template> for Colgroup {}
8783
8784// Thead, Tbody, Tfoot can contain Tr
8785impl CanContain<Tr> for Thead {}
8786impl CanContain<Script> for Thead {}
8787impl CanContain<Template> for Thead {}
8788
8789impl CanContain<Tr> for Tbody {}
8790impl CanContain<Script> for Tbody {}
8791impl CanContain<Template> for Tbody {}
8792
8793impl CanContain<Tr> for Tfoot {}
8794impl CanContain<Script> for Tfoot {}
8795impl CanContain<Template> for Tfoot {}
8796
8797// Tr can contain Th and Td
8798impl CanContain<Th> for Tr {}
8799impl CanContain<Td> for Tr {}
8800impl CanContain<Script> for Tr {}
8801impl CanContain<Template> for Tr {}
8802
8803// Th can contain flow content
8804impl<T: FlowContent> CanContain<T> for Th {}
8805
8806// Td can contain flow content
8807impl<T: FlowContent> CanContain<T> for Td {}
8808
8809// Hgroup can contain headings and p
8810impl CanContain<H1> for Hgroup {}
8811impl CanContain<H2> for Hgroup {}
8812impl CanContain<H3> for Hgroup {}
8813impl CanContain<H4> for Hgroup {}
8814impl CanContain<H5> for Hgroup {}
8815impl CanContain<H6> for Hgroup {}
8816impl CanContain<P> for Hgroup {}
8817impl CanContain<Script> for Hgroup {}
8818impl CanContain<Template> for Hgroup {}
8819
8820// -----------------------------------------------------------------------------
8821// Select and Datalist content model
8822// https://html.spec.whatwg.org/multipage/form-elements.html
8823// -----------------------------------------------------------------------------
8824
8825// Select can contain Option and Optgroup
8826impl CanContain<Option_> for Select {}
8827impl CanContain<Optgroup> for Select {}
8828impl CanContain<Script> for Select {}
8829impl CanContain<Template> for Select {}
8830
8831// Optgroup can contain Option
8832impl CanContain<Option_> for Optgroup {}
8833impl CanContain<Script> for Optgroup {}
8834impl CanContain<Template> for Optgroup {}
8835
8836// Datalist can contain Option and phrasing content
8837impl CanContain<Option_> for Datalist {}
8838impl<T: PhrasingContent> CanContain<T> for Datalist {}
8839
8840// -----------------------------------------------------------------------------
8841// Media content model
8842// https://html.spec.whatwg.org/multipage/media.html
8843// -----------------------------------------------------------------------------
8844
8845// Audio can contain Source, Track, and flow content (fallback)
8846impl CanContain<Source> for Audio {}
8847impl CanContain<Track> for Audio {}
8848
8849// Video can contain Source, Track, and flow content (fallback)
8850impl CanContain<Source> for Video {}
8851impl CanContain<Track> for Video {}
8852
8853// Picture can contain Source and Img
8854impl CanContain<Source> for Picture {}
8855impl CanContain<Img> for Picture {}
8856impl CanContain<Script> for Picture {}
8857impl CanContain<Template> for Picture {}
8858
8859// Map can contain phrasing content (including Area which implements PhrasingContent)
8860impl<T: PhrasingContent> CanContain<T> for Map {}
8861
8862// Object can contain Param and flow content (fallback)
8863impl CanContain<Param> for Object {}
8864impl<T: FlowContent> CanContain<T> for Object {}
8865
8866// Canvas can contain flow content (fallback)
8867impl<T: FlowContent> CanContain<T> for Canvas {}
8868
8869// Noscript can contain various content depending on context
8870impl<T: FlowContent> CanContain<T> for Noscript {}
8871
8872// Template can contain anything (it's transparent content model)
8873// Using FlowContent covers most use cases; metadata elements typically go in Head
8874impl<T: FlowContent> CanContain<T> for Template {}
8875
8876// Slot can contain phrasing content
8877impl<T: PhrasingContent> CanContain<T> for Slot {}
8878
8879// Iframe content is loaded externally, but can have fallback
8880impl<T: FlowContent> CanContain<T> for Iframe {}
8881
8882// =============================================================================
8883// Tests
8884// =============================================================================
8885
8886#[cfg(test)]
8887mod tests {
8888    use super::*;
8889
8890    #[test]
8891    fn test_element_tags() {
8892        assert_eq!(Div::TAG, "div");
8893        assert_eq!(Span::TAG, "span");
8894        assert_eq!(A::TAG, "a");
8895        assert_eq!(Img::TAG, "img");
8896        assert_eq!(Table::TAG, "table");
8897    }
8898
8899    #[test]
8900    #[allow(clippy::assertions_on_constants)]
8901    fn test_void_elements() {
8902        // Non-void elements
8903        assert!(!Div::VOID);
8904        assert!(!Span::VOID);
8905        // Void elements
8906        assert!(Img::VOID);
8907        assert!(Br::VOID);
8908        assert!(Hr::VOID);
8909        assert!(Input::VOID);
8910        assert!(Meta::VOID);
8911        assert!(Link::VOID);
8912    }
8913
8914    #[test]
8915    fn test_content_categories() {
8916        // Test that elements implement correct traits
8917        fn is_flow<T: FlowContent>() {}
8918        fn is_phrasing<T: PhrasingContent>() {}
8919        fn is_sectioning<T: SectioningContent>() {}
8920        fn is_heading<T: HeadingContent>() {}
8921        fn is_embedded<T: EmbeddedContent>() {}
8922        fn is_interactive<T: InteractiveContent>() {}
8923
8924        is_flow::<Div>();
8925        is_flow::<P>();
8926        is_flow::<Span>();
8927        is_phrasing::<Span>();
8928        is_phrasing::<A>();
8929        is_phrasing::<Em>();
8930        is_sectioning::<Article>();
8931        is_sectioning::<Section>();
8932        is_sectioning::<Nav>();
8933        is_heading::<H1>();
8934        is_heading::<H2>();
8935        is_embedded::<Img>();
8936        is_embedded::<Video>();
8937        is_embedded::<Iframe>();
8938        is_interactive::<A>();
8939        is_interactive::<Button>();
8940        is_interactive::<Input>();
8941    }
8942
8943    #[test]
8944    fn test_can_contain() {
8945        // Test valid parent-child relationships
8946        fn valid<P: CanContain<C>, C>() {}
8947
8948        // Document structure
8949        valid::<Html, Head>();
8950        valid::<Html, Body>();
8951        valid::<Head, Title>();
8952        valid::<Head, Meta>();
8953        valid::<Head, Link>();
8954        valid::<Head, Script>();
8955
8956        // Flow content containers
8957        valid::<Body, Div>();
8958        valid::<Body, P>();
8959        valid::<Div, Div>();
8960        valid::<Div, Span>();
8961        valid::<Div, P>();
8962        valid::<Article, Section>();
8963        valid::<Section, Article>();
8964
8965        // Phrasing content
8966        valid::<P, Span>();
8967        valid::<P, A>();
8968        valid::<P, Em>();
8969        valid::<Span, Strong>();
8970        valid::<A, Code>();
8971
8972        // Lists
8973        valid::<Ul, Li>();
8974        valid::<Ol, Li>();
8975        valid::<Li, Div>();
8976        valid::<Li, P>();
8977        valid::<Dl, Dt>();
8978        valid::<Dl, Dd>();
8979
8980        // Tables
8981        valid::<Table, Thead>();
8982        valid::<Table, Tbody>();
8983        valid::<Table, Tfoot>();
8984        valid::<Table, Tr>();
8985        valid::<Thead, Tr>();
8986        valid::<Tbody, Tr>();
8987        valid::<Tr, Th>();
8988        valid::<Tr, Td>();
8989        valid::<Td, Div>();
8990        valid::<Th, Span>();
8991
8992        // Forms
8993        valid::<Form, Input>();
8994        valid::<Form, Button>();
8995        valid::<Form, Label>();
8996        valid::<Select, Option_>();
8997        valid::<Select, Optgroup>();
8998        valid::<Optgroup, Option_>();
8999        valid::<Fieldset, Legend>();
9000
9001        // Media
9002        valid::<Picture, Source>();
9003        valid::<Picture, Img>();
9004        valid::<Audio, Source>();
9005        valid::<Video, Source>();
9006
9007        // Text content
9008        valid::<Div, Text>();
9009        valid::<P, Text>();
9010        valid::<Span, Text>();
9011        valid::<H1, Text>();
9012        valid::<Button, Text>();
9013    }
9014}