Expand description
HTML element types — like Chrome’s core/html/.
§Architecture
§Trait hierarchy (mirrors Chrome)
HtmlElement ← Global HTML attributes, actions
├── FormControlElement ← Disabled, name, form, validity
│ └── TextControlElement ← Value, placeholder, selection
├── MediaElement ← Src, play, pause, muted, controls
└── ReplacedElement ← Intrinsic dimensions§Element categories
| Category | Trait | Elements |
|---|---|---|
| Simple | HtmlElement | div, span, p, h1-h6, section, article, … |
| Form control | FormControlElement | button, input, select, textarea |
| Text control | TextControlElement | input (text types), textarea |
| Media | MediaElement | audio, video |
| Replaced | ReplacedElement | img, canvas, video |
Re-exports§
pub use form_control::FormControlElement;pub use form_control::TextControlElement;pub use html_element::HtmlElement;pub use media_element::MediaElement;pub use replaced::IntrinsicSizing;pub use replaced::ReplacedElement;
Modules§
- form_
control - Form control element trait — shared behavior for all form controls.
- html_
element HtmlElement— shared behavior for ALL HTML elements.- media_
element - Media element trait — shared behavior for audio and video.
- replaced
- Replaced element trait — elements with external/intrinsic content.
Structs§
- Anchor
Data - Element-specific data for anchor elements.
- Button
Data - Element-specific data for
<button>. - Canvas
Data - Element-specific data for
<canvas>. - Form
Data - Element-specific data for
<form>. - Heading
Data - Element-specific data for heading elements.
- Html
Abbr Element <abbr>— abbreviation.- Html
Address Element <address>— contact information.- Html
Anchor Element - A hyperlink element (
<a>). - Html
Article Element <article>— self-contained content.- Html
Aside Element <aside>— tangentially related content.- Html
Audio Element - An audio playback element (
<audio>). - HtmlB
Element <b>— bring attention (bold).- Html
Blockquote Element <blockquote>— block quotation.- Html
Body Element - The document body element (
<body>). - Html
BrElement <br>— line break.- Html
Button Element - A clickable button element (
<button>). - Html
Canvas Element - A canvas element (
<canvas>). - Html
Cite Element <cite>— citation reference.- Html
Code Element <code>— code fragment (monospace).- HtmlD
List Element <dl>— a description list.- Html
DdElement <dd>— a description detail.- Html
Details Element <details>— disclosure widget.- Html
DivElement - A generic container element (
<div>). - Html
DtElement <dt>— a description term.- Html
EmElement <em>— emphasis (typically italic).- Html
FigCaption Element <figcaption>— caption for a<figure>.- Html
Figure Element <figure>— self-contained figure with optional caption.- Html
Footer Element <footer>— footer for a section or page.- Html
Form Element - A form element (
<form>). - Html
Header Element <header>— introductory content for a section or page.- Html
Heading Element - A heading element (
<h1>through<h6>). - Html
HrElement <hr>— thematic break (horizontal rule).- HtmlI
Element <i>— alternate voice (italic).- Html
Image Element - An image element (
<img>). - Html
Input Element - An input element (
<input>). - Html
KbdElement <kbd>— keyboard input (monospace).- Html
Label Element - A label element (
<label>). - Html
LiElement <li>— a list item.- Html
Main Element <main>— the dominant content of the document.- Html
Mark Element <mark>— highlighted text.- Html
NavElement <nav>— navigation links.- HtmlO
List Element <ol>— an ordered list.- Html
Paragraph Element - A paragraph element (
<p>). - Html
PreElement <pre>— preformatted text (monospace, whitespace preserved).- HtmlQ
Element <q>— inline quotation.- HtmlS
Element <s>— strikethrough (no longer accurate).- Html
Section Element <section>— a thematic grouping of content.- Html
Select Element - A select (dropdown/listbox) element (
<select>). - Html
Small Element <small>— side comment (smaller text).- Html
Span Element - A generic inline container element (
<span>). - Html
Strong Element <strong>— strong importance (typically bold).- Html
SubElement <sub>— subscript.- Html
Summary Element <summary>— summary for a<details>element.- Html
SupElement <sup>— superscript.- Html
Text Area Element - A multi-line text editing control (
<textarea>). - Html
Time Element <time>— date/time.- HtmlU
Element <u>— unarticulated annotation (underline).- HtmlU
List Element <ul>— an unordered list.- Html
VarElement <var>— variable.- Html
Video Element - A video playback element (
<video>). - Html
WbrElement <wbr>— word break opportunity.- Image
Data - Element-specific data for
<img>. - Input
Data - Element-specific data for
<input>. - Label
Data - Element-specific data for
<label>. - OList
Data - Element-specific data for
<ol>. - Select
Data - Element-specific data for
<select>. - Text
Area Data - Element-specific data for
<textarea>. - Video
Data - Element-specific data for
<video>.
Enums§
- Input
Type - The type of an
<input>element.