`` covers any tag spelled as an attribute, but a custom element or namespaced name needs the call form
``E("tag", ...)``. A list-valued attribute joins on a space, so a class list reads naturally:
.. testcode::
from turbohtml.build import E
print(E("my-card", {"class": ["card", "lg"]}, "hi").serialize())
.. testoutput::
hi
*********************************
Build a whole page with a shell
*********************************
``E`` builds a fragment; :func:`turbohtml.build.document` builds the whole page. It emits ```` and the
````/````/```` shell around the content you pass, leading the head with a ```` and an
optional ````, and hands back a :class:`~turbohtml.Document`:
.. testcode::
from turbohtml.build import E, document
page = document(
title="Release notes",
lang="en",
body=[E.h1("Release notes"), E.p("Native page-shell builder.")],
)
print(page.serialize())
.. testoutput::
Release notesRelease notes
Native page-shell builder.
Pass ``charset=None`` to drop the meta (say, when an HTTP header sets it), ``title=None`` to omit the title, and extra
``head`` content lands after the meta and title.