API reference¶
html5¶
HTML5 document and CSS3 helpers.
html5.document¶
HTML5 document primitives.
This module provides the core building blocks for constructing HTML5 documents
programmatically. The primary entry point is HtmlDocument, which
manages a title, a language attribute, head nodes, and body nodes and renders
the complete <!doctype html> output.
Leaf node types—Text, Raw, Comment,
Doctype, and Element—all derive from Node and
implement a render() method that returns a string of HTML.
Helper factory functions (text(), raw(), comment(),
doctype_node(), element()) are thin wrappers around the node
classes and are the preferred way to build nodes inline.
- class html5.document.Comment(value)[source]¶
Bases:
NodeAn HTML comment node.
Example:
Comment(" TODO: remove this ").render() # "<!-- TODO: remove this -->"
- Parameters:
value (str)
- class html5.document.Doctype(value='html')[source]¶
Bases:
NodeA doctype declaration node.
Defaults to the standard HTML5 doctype. Pass a custom value for legacy or XHTML doctypes.
Example:
Doctype().render() # "<!doctype html>" Doctype("html").render() # "<!doctype html>"
- Parameters:
value (str)
- class html5.document.Element(tag, children=(), attributes=<factory>, void=False)[source]¶
Bases:
NodeAn HTML element with optional children and attributes.
Attribute names follow Python identifier rules with two normalisation steps applied automatically:
A trailing underscore is stripped (
class_→class).Remaining underscores are replaced with hyphens (
data_foo→data-foo).
Attribute values follow these rules:
NoneorFalse— the attribute is omitted entirely.True— the attribute is rendered as a boolean attribute (no value).Any other value — rendered as a quoted string, HTML-escaped.
Void elements (
<br>,<img>,<input>, …) are rendered without a closing tag when void isTrue.Example:
Element("p", (Text("Hello"),), {"class": "lead"}).render() # '<p class="lead">Hello</p>' Element("br", void=True).render() # '<br>'
- class html5.document.HtmlDocument(title='', lang='en', head_nodes=<factory>, body_nodes=<factory>)[source]¶
Bases:
objectA complete, renderable HTML5 document.
The document always emits a
<!doctype html>declaration and a<meta charset="utf-8">tag. The title is placed inside<title>in the document head. Additional head and body content is appended withadd_head()andadd_body().Example:
from html5 import HtmlDocument, Div, H1, style_tag, CSSStyleSheet sheet = CSSStyleSheet().add_rule("body", margin="0") doc = ( HtmlDocument(title="My page") .add_head(style_tag(sheet)) .add_body(Div(H1("Hello, world!"))) ) print(doc.render())
- add_body(*nodes)[source]¶
Append one or more nodes to the document body.
- add_head(*nodes)[source]¶
Append one or more nodes to the document head.
- head_nodes: list[Node | str]¶
Nodes appended to the document
<head>after the charset meta and title.
- class html5.document.Node[source]¶
Bases:
objectAbstract base class for all HTML document nodes.
Every node implements
render()which returns a plain string of HTML. Leaf nodes are immutable frozen dataclasses;HtmlDocumentis the only mutable container.- render()[source]¶
Return the HTML string for this node.
- Raises:
NotImplementedError – Subclasses must override this method.
- Return type:
- class html5.document.Raw(value)[source]¶
Bases:
NodeA raw HTML node whose content is inserted without escaping.
Use this only for content you trust completely — for example HTML rendered by another part of this library. User-supplied strings should use
Textinstead.Example:
Raw("<strong>bold</strong>").render() # "<strong>bold</strong>"
- Parameters:
value (str)
- class html5.document.Text(value)[source]¶
Bases:
NodeAn HTML-escaped text node.
The value is escaped with
html.escape()so that characters such as<,>, and&are converted to their HTML entities and cannot be interpreted as markup.Example:
Text("Hello <world>").render() # "Hello <world>"
- Parameters:
value (str)
- html5.document.doctype()[source]¶
Return the HTML5 doctype declaration string.
- Returns:
The literal string
"<!doctype html>".- Return type:
- html5.document.element(tag, *children, void=False, **attributes)[source]¶
Create an HTML element node.
Attribute names are normalised: trailing underscores are stripped and remaining underscores are replaced with hyphens, so
data_value="x"becomesdata-value="x"andclass_="btn"becomesclass="btn".- Parameters:
- Returns:
An
Elementnode.- Return type:
Example:
element("a", "Click me", href="/home", class_="nav-link").render() # '<a href="/home" class="nav-link">Click me</a>'
html5.css¶
CSS3 stylesheet helpers.
This module provides a tree of immutable CSS node classes that mirrors the
structure of a CSS stylesheet: declarations, rules, at-rules, keyframes, and
complete stylesheets. Every node implements render() which returns a
plain CSS string.
The mutable CSSStyleSheet accumulates nodes and renders them as a
complete stylesheet. Use it with style_tag() to embed styles in an
HtmlDocument, or with
MarkupWriter to write a .css file to disk.
CSS custom properties (variables) are supported via CSSCustomProperties
and the css_var() helper:
from html5 import CSSStyleSheet, css_var
sheet = (
CSSStyleSheet()
.add_custom_properties({"--size-1": "0.25rem", "--color-brand": "#005fcc"})
.add_rule("button", ("padding", css_var("--size-1")))
)
- html5.css.BOOTSTRAP5_CSS_URL = 'https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css'¶
The jsDelivr CDN URL for Bootstrap 5.3.3 CSS.
- class html5.css.CSSAtRule(name, prelude='', body=(), block=True)[source]¶
Bases:
CSSNodeA generic CSS at-rule (
@name prelude { body }or@name prelude;).Use the specialised subclasses (
CSSMediaRule,CSSSupportsRule,CSSLayerRule,CSSImportRule,CSSKeyframesRule) for common at-rules. Use this class directly for less common ones such as@charset.- Parameters:
name (str) – The at-rule name, with or without the leading
@. Underscores are replaced with hyphens.prelude (str) – Optional text between the rule name and the block or semicolon.
body (tuple[CSSNode | str, ...]) – Child nodes or strings rendered inside the block.
block (bool) – If
True(default) renders a{ body }block; ifFalserenders a semicolon-terminated statement.
Example:
CSSAtRule("charset", '"UTF-8"', block=False).render() # '@charset "UTF-8";'
- class html5.css.CSSComment(value)[source]¶
Bases:
CSSNodeA CSS comment node.
Example:
CSSComment("Reset styles").render() # "/* Reset styles */"
- Parameters:
value (str)
- class html5.css.CSSCustomProperties(props, selector=':root')[source]¶
Bases:
CSSNodeA block of CSS custom properties (variables) on a selector.
Renders a
selector { --name: value; ... }block. The selector defaults to:rootso the variables are available document-wide.Pass a plain
dictmapping--namestrings to their values. Usecss_var()to reference them in other declarations.- Parameters:
Example:
CSSCustomProperties( {"--size-1": "0.25rem", "--color-brand": "#005fcc"}, ).render() # ":root { --size-1: 0.25rem; --color-brand: #005fcc; }" CSSCustomProperties({"--fg": "#fff"}, selector="[data-theme='dark']")
- class html5.css.CSSDeclaration(property_name, value, important=False)[source]¶
Bases:
CSSNodeA single CSS property–value declaration.
Property names are normalised: underscores are replaced with hyphens, so
font_sizebecomesfont-size. CSS custom property names (starting with--) pass through unchanged.- Parameters:
Example:
CSSDeclaration("font_size", "1rem").render() # "font-size: 1rem;" CSSDeclaration("--size-1", "0.25rem").render() # "--size-1: 0.25rem;" CSSDeclaration("color", "red", important=True).render() # "color: red !important;"
- class html5.css.CSSImportRule(url, media='')[source]¶
Bases:
CSSAtRuleA CSS
@importrule.- Parameters:
Example:
CSSImportRule("reset.css").render() # '@import url("reset.css");' CSSImportRule("print.css", media="print").render() # '@import url("print.css") print;'
- class html5.css.CSSInlineStyle(*declarations)[source]¶
Bases:
CSSNodeA sequence of CSS declarations for use in a
styleattribute.Accepts the same declaration forms as
CSSRule: aCSSDeclaration, a(name, value)tuple, or a single-key mapping.Use
inline_style()for a convenience wrapper that returns a string directly suitable for thestyleattribute.Example:
CSSInlineStyle(("color", "red"), ("font_size", "1rem")).render() # "color: red; font-size: 1rem;"
- class html5.css.CSSKeyframe(selector, *declarations)[source]¶
Bases:
CSSNodeA single keyframe stop inside a
CSSKeyframesRule.- Parameters:
Example:
CSSKeyframe("from", ("opacity", 0)).render() # "from { opacity: 0; }"
- class html5.css.CSSKeyframesRule(name, frames=())[source]¶
Bases:
CSSNodeA CSS
@keyframesrule.- Parameters:
name (str) – The animation name.
frames (tuple[CSSKeyframe, ...]) – The keyframe stops as
CSSKeyframeinstances.
Example:
CSSKeyframesRule( "fade", frames=(CSSKeyframe("from", ("opacity", 0)), CSSKeyframe("to", ("opacity", 1))), ).render() # "@keyframes fade { from { opacity: 0; } to { opacity: 1; } }"
- frames: tuple[CSSKeyframe, ...] = ()¶
- class html5.css.CSSLayerRule(layer='', *rules)[source]¶
Bases:
CSSAtRuleA CSS
@layerblock.- Parameters:
Example:
CSSLayerRule("utilities", CSSRule(".hidden", ("display", "none"))).render() # "@layer utilities { .hidden { display: none; } }"
- class html5.css.CSSLink(href, rel='stylesheet', attributes=<factory>)[source]¶
Bases:
CSSNodeA
<link rel="stylesheet">element node.- Parameters:
Example:
CSSLink(href="styles.css").render() # '<link rel="stylesheet" href="styles.css">'
- class html5.css.CSSMediaRule(query, *rules)[source]¶
Bases:
CSSAtRuleA CSS
@mediablock.- Parameters:
Example:
CSSMediaRule( "(prefers-color-scheme: dark)", CSSRule("body", ("background", "#000")), ).render() # "@media (prefers-color-scheme: dark) { body { background: #000; } }"
- class html5.css.CSSNode[source]¶
Bases:
objectAbstract base class for all CSS document nodes.
Every subclass implements
render()which returns a plain CSS string.- render()[source]¶
Return the CSS string for this node.
- Raises:
NotImplementedError – Subclasses must override this method.
- Return type:
- class html5.css.CSSRule(selector, *declarations)[source]¶
Bases:
CSSNodeA CSS selector rule with one or more declarations.
Accepts three declaration forms:
A
CSSDeclarationinstance.A
(property_name, value)tuple.A single-key
Mapping{"property_name": value}.
Property names are normalised: underscores become hyphens.
- Parameters:
Example:
CSSRule("body", ("margin", 0), ("font_family", "system-ui")).render() # "body { margin: 0; font-family: system-ui; }"
- class html5.css.CSSStyleElement(stylesheet)[source]¶
Bases:
CSSNodeA complete
<style>element wrapping a stylesheet or CSS node.Prefer
style_tag()over this class directly, asstyle_tag()avoids double-wrapping when passed aCSSStyleElement.Example:
CSSStyleElement(CSSStyleSheet().add_rule("p", ("color", "red"))).render() # "<style>p { color: red; }</style>"
- class html5.css.CSSStyleSheet(rules=<factory>)[source]¶
Bases:
CSSNodeA mutable CSS stylesheet that accumulates rules and renders them in order.
Build a stylesheet by chaining the
add_*methods, then pass it tostyle_tag()for embedding in an HTML document or toMarkupWriterfor writing to disk.Example:
from html5 import CSSStyleSheet, css_var, style_tag, HtmlDocument sheet = ( CSSStyleSheet() .add_custom_properties({"--brand": "#005fcc", "--gap": "1rem"}) .add_comment("Base styles") .add_import("reset.css") .add_rule("body", margin="0", font_family="system-ui") .add_rule("a", ("color", css_var("--brand"))) .add_media("(prefers-color-scheme: dark)", CSSRule("body", ("background", "#111"))) ) doc = HtmlDocument(title="Example").add_head(style_tag(sheet))
- add(*items)[source]¶
Append one or more raw nodes or strings to the stylesheet.
- add_comment(value)[source]¶
Append a CSS comment.
- Parameters:
value (str) – The comment text (without
/* */delimiters).- Returns:
This stylesheet (for method chaining).
- Return type:
- add_custom_properties(props, selector=':root')[source]¶
Append a CSS custom-properties block.
- Parameters:
- Returns:
This stylesheet (for method chaining).
- Return type:
Example:
sheet.add_custom_properties({"--size-1": "0.25rem", "--color-brand": "#005fcc"})
- add_import(url, media='')[source]¶
Append a CSS
@importrule.- Parameters:
- Returns:
This stylesheet (for method chaining).
- Return type:
- add_keyframes(name, *frames)[source]¶
Append a CSS
@keyframesrule.- Parameters:
name (str) – The animation name.
*frames (CSSKeyframe) –
CSSKeyframestops.
- Returns:
This stylesheet (for method chaining).
- Return type:
- add_layer(layer='', *rules)[source]¶
Append a CSS
@layerblock.- Parameters:
- Returns:
This stylesheet (for method chaining).
- Return type:
- add_media(query, *rules)[source]¶
Append a CSS
@mediablock.- Parameters:
- Returns:
This stylesheet (for method chaining).
- Return type:
- add_raw(css)[source]¶
Append a raw CSS string.
Use this for CSS that has no dedicated node class (e.g. a vendor-prefixed block or a one-off snippet).
- Parameters:
css (str) – A raw CSS string to insert verbatim.
- Returns:
This stylesheet (for method chaining).
- Return type:
- add_rule(selector, *declarations, **keyword_declarations)[source]¶
Append a CSS selector rule.
Declarations may be passed positionally (as
CSSDeclaration, tuples, or single-key mappings) or as keyword arguments. Keyword argument names are normalised: underscores become hyphens.- Parameters:
- Returns:
This stylesheet (for method chaining).
- Return type:
Example:
sheet.add_rule("body", margin="0", font_family="system-ui") sheet.add_rule("h1", ("font_size", "2rem"), ("color", "#111"))
- class html5.css.CSSSupportsRule(condition, *rules)[source]¶
Bases:
CSSAtRuleA CSS
@supportsblock.- Parameters:
Example:
CSSSupportsRule( "(display: grid)", CSSRule("div", ("display", "grid")), ).render() # "@supports (display: grid) { div { display: grid; } }"
- html5.css.GOOGLE_FONTS_PRECONNECT_URL = 'https://fonts.googleapis.com'¶
The Google Fonts API preconnect URL.
- html5.css.GOOGLE_FONTS_STATIC_URL = 'https://fonts.gstatic.com'¶
The Google Fonts static assets preconnect URL.
- html5.css.TAILWIND_PLAY_CDN_URL = 'https://cdn.tailwindcss.com'¶
The Tailwind CSS Play CDN script URL.
- html5.css.bootstrap5_stylesheet(version='5.3.3')[source]¶
Return a Bootstrap 5 stylesheet
<link>node from jsDelivr.
- html5.css.css_var(name)[source]¶
Return a CSS
var()reference for a custom property.- Parameters:
name (str) – The custom property name including the
--prefix (e.g."--size-1").- Returns:
A string of the form
"var(--size-1)".- Return type:
Example:
css_var("--color-brand") # "var(--color-brand)"
- html5.css.google_fonts_assets(*families, weights=(400, 500, 700), display='swap', text=None)[source]¶
Return the three
<link>nodes required to load Google Fonts.Returns a preconnect to
fonts.googleapis.com, a crossorigin preconnect tofonts.gstatic.com, and the CSS stylesheet link — in the correct order for optimal font loading performance.- Parameters:
- Returns:
(preconnect, crossorigin_preconnect, stylesheet).- Return type:
A 3-tuple of
CSSLinknodes
Example:
doc.add_head(*google_fonts_assets("Inter"))
- html5.css.google_fonts_url(*families, weights=(400, 500, 700), display='swap', text=None)[source]¶
Build a Google Fonts CSS2 API URL for the requested font families.
- Parameters:
*families (str) – One or more font family names (e.g.
"Inter","Open Sans").weights (Sequence[int]) – The font weights to request. Defaults to
(400, 500, 700).display (str) – The
font-displayvalue. Defaults to"swap".text (str | None) – If provided, restricts the character set to the given string for smaller downloads.
- Returns:
A Google Fonts CSS2 URL string.
- Raises:
ValueError – If no font families are provided.
- Return type:
Example:
google_fonts_url("Inter", "Open Sans", weights=(400, 700)) # "https://fonts.googleapis.com/css2?family=Inter:wght@400;700&..."
- html5.css.inline_style(*declarations, **keyword_declarations)[source]¶
Render CSS declarations as a string for a
styleattribute.- Parameters:
*declarations (CSSDeclaration | tuple[str, Any] | Mapping[str, Any]) – Positional declarations (
CSSDeclaration, tuples, or single-key mappings).**keyword_declarations (Any) – Keyword declarations with underscore→hyphen name normalisation.
- Returns:
A CSS declaration string suitable for a
styleattribute value.- Return type:
Example:
inline_style(("border_radius", "8px"), color="red") # "border-radius: 8px; color: red;"
- html5.css.style_tag(stylesheet)[source]¶
Wrap a stylesheet or CSS node in a
<style>tag.If stylesheet is already a
CSSStyleElement(which renders its own<style>wrapper), it is returned as-is to prevent double-wrapping.- Parameters:
stylesheet (CSSNode | str) – A
CSSNodeor raw CSS string to embed.- Returns:
A
Rawnode containing the<style>tag.- Return type:
Example:
sheet = CSSStyleSheet().add_rule("body", margin="0") doc.add_head(style_tag(sheet))
html5.js¶
JavaScript helpers for HTML documents.
Provides JSScript and convenience factory functions for common
JavaScript patterns: external script tags, inline scripts, Bootstrap 5 bundle,
and Google Charts loaders.
- class html5.js.JSNode[source]¶
Bases:
objectAbstract base class for JavaScript document nodes.
Every subclass implements
render()which returns an HTML string.- render()[source]¶
Return the HTML string for this node.
- Raises:
NotImplementedError – Subclasses must override this method.
- Return type:
- class html5.js.JSScript(src=None, code='', attributes=<factory>)[source]¶
Bases:
JSNodeRender an inline or external JavaScript
<script>tag.Set src for an external script, or code for an inline script. Setting both raises
ValueError. Additional HTML attributes (e.g.defer,type) may be passed via attributes.- Parameters:
- Raises:
ValueError – If both src and code are provided.
Example:
JSScript(src="https://example.com/app.js").render() # '<script src="https://example.com/app.js"></script>' JSScript(code="console.log('hi')").render() # "<script>console.log('hi')</script>"
- html5.js.bootstrap5_bundle_script(version='5.3.3')[source]¶
Return the Bootstrap 5 bundle
<script>node from jsDelivr.The bundle includes Popper.js, so no separate Popper script is required.
- html5.js.google_charts_loader(version='51')[source]¶
Return the Google Charts loader
<script>node.This loads the Google Charts core loader. Call
google_charts_package_loader()separately to request specific chart packages once the loader is present.
- html5.js.google_charts_package_loader(packages, callback=None)[source]¶
Return an inline Google Charts package-load snippet.
Renders an inline
<script>that callsgoogle.charts.load()for the specified packages. Optionally registers a callback viagoogle.charts.setOnLoadCallback().- Parameters:
- Returns:
A
JSScriptwith the inline Google Charts loader snippet.- Return type:
Example:
google_charts_package_loader(["corechart"], callback="drawChart") # Renders an inline script calling google.charts.load(...)
- html5.js.javascript_link(src, **attributes)[source]¶
Create an external
<script>node.- Parameters:
- Returns:
A
JSScriptnode referencing an external URL.- Return type:
Example:
javascript_link("https://example.com/app.js", defer=True).render() # '<script src="https://example.com/app.js" defer></script>'
html5.loader¶
File loaders that read HTML and CSS into html5 document objects.
- html5.loader.css_loader(path)[source]¶
Read a CSS file and return a
CSSStyleSheet.The file content is stored as a single raw CSS block; no parsing of individual rules is performed.
- Parameters:
- Returns:
A
CSSStyleSheetwhose rendered output is the file content.- Return type:
- html5.loader.html_loader(path)[source]¶
Read an HTML file and return an
HtmlDocument.The document title,
langattribute, head nodes, and body content are extracted from the file. The charset<meta>tag is stripped (sinceHtmlDocument.render()always emits one). All other head and body content is preserved as a singleRawnode each.- Parameters:
- Returns:
An
HtmlDocumentpopulated from the file.- Return type:
html5.writer¶
Utilities for writing rendered HTML and CSS to disk.
MarkupWriter provides a safe, root-anchored disk writer that prevents
path traversal outside a configured base directory. Pass rendered HTML or CSS
strings, or any object with a render() method, and the writer handles
directory creation and encoding.
- class html5.writer.MarkupWriter(root=PosixPath('.'), encoding='utf-8')[source]¶
Bases:
objectWrite rendered HTML and CSS content beneath a fixed root directory.
All paths passed to write methods must be relative to root. Absolute paths and
..traversal that would escape root are rejected withValueError. Parent directories are created automatically.- Parameters:
Example:
from html5 import CSSStyleSheet, HtmlDocument, MarkupWriter writer = MarkupWriter(root="build") doc = HtmlDocument(title="Hello").add_body("<p>Hello</p>") sheet = CSSStyleSheet().add_rule("body", margin="0") writer.write_html("index.html", doc) writer.write_css("styles/site.css", sheet)
- write_css(path, stylesheet)[source]¶
Write rendered CSS to a file beneath the root directory.
- Parameters:
path (str | Path) – A relative path for the output
.cssfile.stylesheet (Renderable | str) – An object with a
render()method (e.g.CSSStyleSheet) or a plain CSS string.
- Returns:
The absolute
Pathof the written file.- Return type:
- write_html(path, document)[source]¶
Write rendered HTML to a file beneath the root directory.
- Parameters:
path (str | Path) – A relative path for the output
.htmlfile.document (Renderable | str) – An object with a
render()method (e.g.HtmlDocument) or a plain HTML string.
- Returns:
The absolute
Pathof the written file.- Return type:
html5.elements¶
Generated HTML5 element classes.
- class html5.elements.Address(*children, **attributes)¶
Bases:
ElementRender a <address> HTML element.
- class html5.elements.Article(*children, **attributes)¶
Bases:
ElementRender a <article> HTML element.
- class html5.elements.Blockquote(*children, **attributes)¶
Bases:
ElementRender a <blockquote> HTML element.
- class html5.elements.Button(*children, **attributes)¶
Bases:
ElementRender a <button> HTML element.
- class html5.elements.Canvas(*children, **attributes)¶
Bases:
ElementRender a <canvas> HTML element.
- class html5.elements.Caption(*children, **attributes)¶
Bases:
ElementRender a <caption> HTML element.
- class html5.elements.Colgroup(*children, **attributes)¶
Bases:
ElementRender a <colgroup> HTML element.
- class html5.elements.Datalist(*children, **attributes)¶
Bases:
ElementRender a <datalist> HTML element.
- class html5.elements.Details(*children, **attributes)¶
Bases:
ElementRender a <details> HTML element.
- class html5.elements.Dialog(*children, **attributes)¶
Bases:
ElementRender a <dialog> HTML element.
- class html5.elements.Fieldset(*children, **attributes)¶
Bases:
ElementRender a <fieldset> HTML element.
- class html5.elements.Figcaption(*children, **attributes)¶
Bases:
ElementRender a <figcaption> HTML element.
- class html5.elements.Figure(*children, **attributes)¶
Bases:
ElementRender a <figure> HTML element.
Bases:
ElementRender a <footer> HTML element.
- class html5.elements.Header(*children, **attributes)¶
Bases:
ElementRender a <header> HTML element.
- class html5.elements.Hgroup(*children, **attributes)¶
Bases:
ElementRender a <hgroup> HTML element.
- class html5.elements.Iframe(*children, **attributes)¶
Bases:
ElementRender a <iframe> HTML element.
- class html5.elements.Legend(*children, **attributes)¶
Bases:
ElementRender a <legend> HTML element.
Bases:
ElementRender a <nav> HTML element.
- class html5.elements.Noscript(*children, **attributes)¶
Bases:
ElementRender a <noscript> HTML element.
- class html5.elements.Object(*children, **attributes)¶
Bases:
ElementRender a <object> HTML element.
- class html5.elements.Optgroup(*children, **attributes)¶
Bases:
ElementRender a <optgroup> HTML element.
- class html5.elements.Option(*children, **attributes)¶
Bases:
ElementRender a <option> HTML element.
- class html5.elements.Output(*children, **attributes)¶
Bases:
ElementRender a <output> HTML element.
- class html5.elements.Picture(*children, **attributes)¶
Bases:
ElementRender a <picture> HTML element.
- class html5.elements.Progress(*children, **attributes)¶
Bases:
ElementRender a <progress> HTML element.
- class html5.elements.Script(*children, **attributes)¶
Bases:
ElementRender a <script> HTML element.
- class html5.elements.Section(*children, **attributes)¶
Bases:
ElementRender a <section> HTML element.
- class html5.elements.Select(*children, **attributes)¶
Bases:
ElementRender a <select> HTML element.
- class html5.elements.Source(*children, **attributes)¶
Bases:
ElementRender a <source> HTML element.
- class html5.elements.Strong(*children, **attributes)¶
Bases:
ElementRender a <strong> HTML element.
- class html5.elements.Summary(*children, **attributes)¶
Bases:
ElementRender a <summary> HTML element.
- class html5.elements.Template(*children, **attributes)¶
Bases:
ElementRender a <template> HTML element.
- class html5.elements.Textarea(*children, **attributes)¶
Bases:
ElementRender a <textarea> HTML element.