P5JS DOM

The DOM library allows you to interact with html elements on your webpage. Read more about it here and also see the full list of functions.

To use this library, you will need to flip the slider on OpenProcessing to include it in your sketch. Or working locally, you will have to add a path to the dom library in the index.html file. The dom library file can downloaded from the p5 site, or it can be linked to online here.

For a quick selection of some dom functions are here. Note these functions will put html elements on your page. Do the reading at the link above to see how the dom library also contains two objects that have different sets of functions.