My paragraph '<p> </p>' is not uder the sketch

<body>
    <h1>Hello World!</h1>
    <script src="sketch.js"></script>
    <p>I should be under the sketch</p>
  </body>

image
(it is not under the sketch)
How does this exactly work?

1 Like

Anything inside an HTML doc is processed before p5js is started and its main <canvas> created. :framed_picture:

If you want a <p> tag after p5js’ <canvas>, use p5::createP(): :bulb:
p5js.org/reference/#/p5/createP

3 Likes