This example has 3 files:

  • hello_p5.html
  • hello_p5.css
  • hello_p5.js

hello.html

<html>
    <head>
        <title>My awesome website</title>
        <link href="hello.css" rel="stylesheet">
        <script src="hello.js"></script> 
    </head>
    <body>
        <button onclick="myFunction()">Click me!</button>
        <p>
            The <i>quick</i> brown fox jumps over the <b>lazy</b> dog.
            The <i>quick</i> brown fox jumps over the <b>lazy</b> dog.
            The <i>quick</i> brown fox jumps over the <b>lazy</b> dog.
            The <i>quick</i> brown fox jumps over the <b>lazy</b> dog.
        </p>
        <p>
            My favorite things:
            <ul>
                <li>Math</li>
                <li>Computers</li>
                <li>Cats</li>
            </ul>
        </p>
        <a href="http://stem.marlborough.org">STEM website</a>
    </body>
</html>

hello.css

body {
    background-color: #0000ff;
}

p {
    background-color: #ff0000;
}

hello.js

function myFunction() 
{
    window.alert("Hello, world!");
}