JSFiddle - React, Tailwind, and code Playground

HTML

<p>Here's some red text</p>
<!--some element with id someElement will go here-->
<canvas id="canvas" width="1000" height="50"></canvas>
<p>Here's some blue text, which should be divided from the red text with a wavy line</p>

CSS

p:nth-of-type(1) {
    color: red;
}
#someElement {
}
p:nth-of-type(2) {
    color: blue;
}

JavaScript

var canvas = document.getElementById("canvas");
if (canvas == null || !canvas.getContext) {
    return;
}
var ctx = canvas.getContext("2d");
ctx.beginPath();
ctx.lineWidth = 1;
ctx.strokeStyle = "rgb(11,153,11)";

for (var i = 0; i <= 1000; i++) {
    
    var x = i * 5;
    var y = Math.sin(5 * x + 1);
    ctx.lineTo(0.5 + x, 25 - y * 24);
}
ctx.stroke();