JSFiddle - React, Tailwind, and code Playground

HTML

<button onclick="add_google_logo();">Add Google Logo</button>

JavaScript

function add_google_logo() {
        var src = "http://google.com/images/logo.gif";
        show_image("http://google.com/images/logo.gif", 276,110, "Google Logo");
    }


    function show_image(src, width, height, alt) {
        var img = document.createElement("img");
        img.src = src;
        img.width = width;
        img.height = height;
        img.alt = alt;
        document.body.appendChild(img);
    }