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
String:
tag for the new element.
content
String:
HTML content to insert into the element.
Returns
p5.Element: new p5.Element object.
This page is generated from the comments in src/dom/dom.js . Please feel free to edit it and submit a pull request!