JSFiddle - React, Tailwind, and code Playground

HTML

Width: <input id="width"><br>

Height:<input type="text" id="height"> <br>

Content:<input type="text" id="content"> <br>

Result:<div id="result">

JavaScript

$("input").keyup(function() {
    $("#result").text(
        '<div width="' + $("#width").val() + 
        'px" height="' + $("#height").val() + 
        'px">' + $("#content").val() + 
        '</div>');
});