JSFiddle - React, Tailwind, and code Playground

by aldomatic

HTML

<canvas id="myCanvas" width="400" height="300"></canvas>

JavaScript

canvasApp();   

    
    function canvasApp(){
     var theCanvas = document.getElementById("myCanvas");
     var context = theCanvas.getContext("2d");
                                       
     context.fillStyle = "#000";
     context.fillRect(0,0,500,300);

     context.fillStyle = "#fff";   
     context.font = "50px _sans";
     context.textBaseline = "top";
     context.fillText("Sup!",105, 80);
                                        
    }