el
Callable
Type parameters
- T: keyof HTMLElementTagNameMap
Parameters
tag: T
The type of HTML element to create.
optionalprops: HTMLElement | Partial<{ style: Properties<0 | (string & {}), string & {}> } & Omit<HTMLElementTagNameMap[T], style>> | Children
The properties or children nodes to add to the element.
rest...children: Children
The children nodes to add to the element.
Returns HTMLElementTagNameMap[T]
The newly created HTML element of the specified type.
Creates a new HTML element of the specified type and with the given attributes and children nodes.