Just started trying to learn HTML, and I’m having trouble using a Javascript file within it. I want to use the p5.js Javascript library and I have created a canvas within a file called sketch.js. Why does only my H1 show up when I run the HTML? Sorry for being a big noob, here’s the HTML code:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Web Page</title>
<script src="/sketch.js"></script>
</head>
<body>
<h1>Hello World!</h1>
</body>
</html>