p5 examples

A collection of code examples for p5.js (in progress).

Hello HTML

hello_html.html

<html>
    <head>
        <style>
            body {background-color: #aaa;}
            b {color: blue;}
            p {font-style: italic;}
        </style>
        <script>
            function myFunction() {window.alert("Hello, world!");}
        </script>
        <!-- or use external files:
            <link href="main.css" rel="stylesheet">
            <script src="main.js"></script>
        -->
    </head>
    <body>
        <b>
        The quick brown fox jumps over the lazy dog.
        </b>
        <p>
        The quick brown fox jumps over the lazy dog.
        The quick brown fox jumps over the lazy dog.
        The quick brown fox jumps over the lazy dog.
        The quick brown fox jumps over the lazy dog.
        The quick brown fox jumps over the lazy dog.
        </p>
        <button onclick="myFunction()">Click me!</button>
    </body>
</html>