Displaying code on website

Hi,

Newbie question…

Once you have some code you are happy with is it possible to add it to an HTML page? One site I use is coded in HTML and PHP?

You can embed Processing sketches using Processing.js, or you can convert your code to P5.js. This assumes that you aren’t using any Java-specific libraries.

Shameless self-promotion: here is a guide on using Processing.js:

1 Like

Also: If you are just getting started with Processing / programming (not already invested in Processing (Java) mode code or libraries) and your primary goal is to publish things on the web, then your best bet is (probably) to begin by learning p5.js and write everything in JavaScript. Then you don’t have to translate / export – it is already ready for the web.

How to add processing programm to a website ?

You could use processing.js on your webpage to display your .pde files.

Here´s a tutorial on how to get started.