1<html>
2 <head>
3 <title>My Sketch</title>
4 <script src="http://cdnjs.cloudflare.com/ajax/libs/p5.js/0.5.6/p5.js"></script>
5 <script src="sketch.js"></script>
6 </head>
7 <body>
8 <p>Here is my sketch:</p>
9 <div id="sketch-holder">
10 <!-- Our sketch will go here! -->
11 </div>
12 <p>Pretty cool, eh?</p>
13 </body>
14</html>
1// sketch.js
2
3function setup() {
4 var canvas = createCanvas(100, 100);
5
6 // Move the canvas so it’s inside our <div id="sketch-holder">.
7 canvas.parent('sketch-holder');
8
9 background(255, 0, 200);
10}