Source

punkybrowster.work / tests / pages / test_dom_query.html

<html>

<head>
    <title>test_dom_query</title>
    
    <style>
    p { background-color: goldenrod; padding: 8px; margin-bottom: 30px; }
    </style>

    <script>
    window.onload = function() {
        for (var i=0; i < 20; i++) {
            var el = document.createElement('p');
            el.innerHTML = '(' + (i+1) + ') Hello Universe!';
            document.body.appendChild(el);
        }
    }
    </script>

</head>

<body>

<h2 title="An apt description of this page">This page dynamically creates a lot of paragraph elements.</h2>

</body>
</html>