Skip to main content

Module html

Module html 

Source
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

CategoryTraitElements
SimpleHtmlElementdiv, span, p, h1-h6, section, article, …
Form controlFormControlElementbutton, input, select, textarea
Text controlTextControlElementinput (text types), textarea
MediaMediaElementaudio, video
ReplacedReplacedElementimg, 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§

AnchorData
Element-specific data for anchor elements.
ButtonData
Element-specific data for <button>.
CanvasData
Element-specific data for <canvas>.
FormData
Element-specific data for <form>.
HeadingData
Element-specific data for heading elements.
HtmlAbbrElement
<abbr> — abbreviation.
HtmlAddressElement
<address> — contact information.
HtmlAnchorElement
A hyperlink element (<a>).
HtmlArticleElement
<article> — self-contained content.
HtmlAsideElement
<aside> — tangentially related content.
HtmlAudioElement
An audio playback element (<audio>).
HtmlBElement
<b> — bring attention (bold).
HtmlBlockquoteElement
<blockquote> — block quotation.
HtmlBodyElement
The document body element (<body>).
HtmlBrElement
<br> — line break.
HtmlButtonElement
A clickable button element (<button>).
HtmlCanvasElement
A canvas element (<canvas>).
HtmlCiteElement
<cite> — citation reference.
HtmlCodeElement
<code> — code fragment (monospace).
HtmlDListElement
<dl> — a description list.
HtmlDdElement
<dd> — a description detail.
HtmlDetailsElement
<details> — disclosure widget.
HtmlDivElement
A generic container element (<div>).
HtmlDtElement
<dt> — a description term.
HtmlEmElement
<em> — emphasis (typically italic).
HtmlFigCaptionElement
<figcaption> — caption for a <figure>.
HtmlFigureElement
<figure> — self-contained figure with optional caption.
HtmlFooterElement
<footer> — footer for a section or page.
HtmlFormElement
A form element (<form>).
HtmlHeaderElement
<header> — introductory content for a section or page.
HtmlHeadingElement
A heading element (<h1> through <h6>).
HtmlHrElement
<hr> — thematic break (horizontal rule).
HtmlIElement
<i> — alternate voice (italic).
HtmlImageElement
An image element (<img>).
HtmlInputElement
An input element (<input>).
HtmlKbdElement
<kbd> — keyboard input (monospace).
HtmlLabelElement
A label element (<label>).
HtmlLiElement
<li> — a list item.
HtmlMainElement
<main> — the dominant content of the document.
HtmlMarkElement
<mark> — highlighted text.
HtmlNavElement
<nav> — navigation links.
HtmlOListElement
<ol> — an ordered list.
HtmlParagraphElement
A paragraph element (<p>).
HtmlPreElement
<pre> — preformatted text (monospace, whitespace preserved).
HtmlQElement
<q> — inline quotation.
HtmlSElement
<s> — strikethrough (no longer accurate).
HtmlSectionElement
<section> — a thematic grouping of content.
HtmlSelectElement
A select (dropdown/listbox) element (<select>).
HtmlSmallElement
<small> — side comment (smaller text).
HtmlSpanElement
A generic inline container element (<span>).
HtmlStrongElement
<strong> — strong importance (typically bold).
HtmlSubElement
<sub> — subscript.
HtmlSummaryElement
<summary> — summary for a <details> element.
HtmlSupElement
<sup> — superscript.
HtmlTextAreaElement
A multi-line text editing control (<textarea>).
HtmlTimeElement
<time> — date/time.
HtmlUElement
<u> — unarticulated annotation (underline).
HtmlUListElement
<ul> — an unordered list.
HtmlVarElement
<var> — variable.
HtmlVideoElement
A video playback element (<video>).
HtmlWbrElement
<wbr> — word break opportunity.
ImageData
Element-specific data for <img>.
InputData
Element-specific data for <input>.
LabelData
Element-specific data for <label>.
OListData
Element-specific data for <ol>.
SelectData
Element-specific data for <select>.
TextAreaData
Element-specific data for <textarea>.
VideoData
Element-specific data for <video>.

Enums§

InputType
The type of an <input> element.