Creates a new p5.Element object.
The first parameter, tag
, is a string an HTML tag such as 'h5'
.
The second parameter, content
, is optional. It's a string that sets the HTML content to insert into the new element. New elements have no content by default.
Examples
Syntax
createElement(tag, [content])
Parameters
tag
tag for the new element.
content
HTML content to insert into the element.
Notice any errors or typos? Please let us know. Please feel free to edit src/dom/dom.js and open a pull request!