Skip to content

tag

tag(_name, /, *children, **attributes)

Build an element. Children are escaped unless they are :class:Raw. Void elements (input/br/…) render self-closing and ignore children.

The element name is positional-only (_name, before /) so an HTML attribute called name can be passed as a keyword without colliding with this parameter.